地图页
This commit is contained in:
parent
6e81762fbb
commit
66d74d87cb
27
app.js
27
app.js
|
|
@ -10,7 +10,6 @@ App({
|
||||||
wx.login({
|
wx.login({
|
||||||
success: res => {
|
success: res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
<<<<<<< HEAD
|
|
||||||
// wx.request({
|
// wx.request({
|
||||||
// url: 'https://www.umayle.com/weixin_api/API/Wx/User/GetUserInfo.ashx?appName=Inland&code='+res.code,
|
// url: 'https://www.umayle.com/weixin_api/API/Wx/User/GetUserInfo.ashx?appName=Inland&code='+res.code,
|
||||||
// method: 'POST',
|
// method: 'POST',
|
||||||
|
|
@ -33,32 +32,6 @@ App({
|
||||||
// // url:'/pages/register/register'
|
// // url:'/pages/register/register'
|
||||||
// })
|
// })
|
||||||
// }, 2000);
|
// }, 2000);
|
||||||
=======
|
|
||||||
wx.request({
|
|
||||||
// url: 'https://www.umayle.com/weixin_api/API/Wx/User/GetUserInfo.ashx?appName=Inland&code='+res.code,
|
|
||||||
url: ''+res.code,
|
|
||||||
method: 'POST',
|
|
||||||
success:(_res)=>{
|
|
||||||
console.log(_res);
|
|
||||||
let openId = _res.data.openid;
|
|
||||||
this.globalData.openId = openId
|
|
||||||
console.log('openid',openId);
|
|
||||||
wx.request({
|
|
||||||
// url: 'https://www.umayle.com/inland/Api/GetUserInfo.ashx?openId='+openId,
|
|
||||||
url: ''+openId,
|
|
||||||
method: 'POST',
|
|
||||||
success:(_res_)=>{
|
|
||||||
console.log(_res_,',,,res');
|
|
||||||
this.globalData.userInfo = _res_.data.data
|
|
||||||
if(_res_.data.code == 0 && _res_.data.message == '获取成功'){
|
|
||||||
//跳转到列表页面
|
|
||||||
setTimeout(() => {
|
|
||||||
wx.redirectTo({
|
|
||||||
url:'/pages/list/list'
|
|
||||||
// url:'/pages/register/register'
|
|
||||||
})
|
|
||||||
}, 2000);
|
|
||||||
>>>>>>> cdc45140f836a5564ba6d4f94c3e4d7e23d3df72
|
|
||||||
|
|
||||||
// }else{
|
// }else{
|
||||||
// //跳转到注册页面
|
// //跳转到注册页面
|
||||||
|
|
|
||||||
11
app.json
11
app.json
|
|
@ -1,21 +1,10 @@
|
||||||
{
|
{
|
||||||
"pages": [
|
"pages": [
|
||||||
<<<<<<< HEAD
|
|
||||||
"pages/map/map",
|
"pages/map/map",
|
||||||
"pages/start/start",
|
|
||||||
"pages/index/index",
|
|
||||||
"pages/list/list"
|
|
||||||
|
|
||||||
=======
|
|
||||||
"pages/list/list",
|
"pages/list/list",
|
||||||
"pages/item/item",
|
"pages/item/item",
|
||||||
"pages/start/start",
|
"pages/start/start",
|
||||||
"pages/index/index"
|
"pages/index/index"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
>>>>>>> cdc45140f836a5564ba6d4f94c3e4d7e23d3df72
|
|
||||||
],
|
],
|
||||||
"plugins": {
|
"plugins": {
|
||||||
"routePlan": {
|
"routePlan": {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ Page({
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
if (wx.getUserProfile) {
|
if (wx.getUserProfile) {
|
||||||
<<<<<<< HEAD
|
|
||||||
// let url = 'https://www.umayle.com/inland/dist/index.html?openId='+options.openId+'&page='+options.page;
|
// let url = 'https://www.umayle.com/inland/dist/index.html?openId='+options.openId+'&page='+options.page;
|
||||||
// console.log(url);
|
// console.log(url);
|
||||||
// this.setData({
|
// this.setData({
|
||||||
|
|
@ -31,19 +30,6 @@ Page({
|
||||||
// url: url,
|
// url: url,
|
||||||
// canIUseGetUserProfile: true
|
// canIUseGetUserProfile: true
|
||||||
// })
|
// })
|
||||||
=======
|
|
||||||
//https://download-1300932214.cos.ap-nanjing.myqcloud.com/inlandVessel/dist/index.html
|
|
||||||
//let url = 'https://download-1300932214.cos.ap-nanjing.myqcloud.com/inlandVessel/dist/index.html?openId='+options.openId+'&page='+options.page;
|
|
||||||
// let url = 'https://www.umayle.com/inland/dist/index.html?openId='+options.openId+'&page='+options.page;
|
|
||||||
let url = ''+options.openId+'&page='+options.page;
|
|
||||||
console.log(url);
|
|
||||||
this.setData({
|
|
||||||
openId: options.openId,
|
|
||||||
page: options.page,
|
|
||||||
url: url,
|
|
||||||
canIUseGetUserProfile: true
|
|
||||||
})
|
|
||||||
>>>>>>> cdc45140f836a5564ba6d4f94c3e4d7e23d3df72
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getUserProfile(e) {
|
getUserProfile(e) {
|
||||||
|
|
|
||||||
|
|
@ -30,13 +30,13 @@ Page({
|
||||||
page: a,
|
page: a,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// changeNext:function () {
|
changeNext:function () {
|
||||||
// setTimeout(() => {
|
setTimeout(() => {
|
||||||
// wx.redirectTo({
|
wx.redirectTo({
|
||||||
// url:'/pages/item/item'
|
url:'/pages/item/item'
|
||||||
// })
|
})
|
||||||
// }, 2000);
|
}, 2000);
|
||||||
// },
|
},
|
||||||
onLoad: function (options) { // options 为 board页传来的参数
|
onLoad: function (options) { // options 为 board页传来的参数
|
||||||
const _this = this;
|
const _this = this;
|
||||||
// 拼接请求url
|
// 拼接请求url
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
|
|
@ -50,7 +50,14 @@ Page({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 跳转列表
|
||||||
|
handleRouter(){
|
||||||
|
console.log('aaaa');
|
||||||
|
wx.redirectTo({
|
||||||
|
url:'/pages/list/list'
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
|
|
@ -60,7 +67,7 @@ Page({
|
||||||
type: 'wgs84',
|
type: 'wgs84',
|
||||||
altitude: false,
|
altitude: false,
|
||||||
success: (result) => {
|
success: (result) => {
|
||||||
// that.getOnlineDistrict(result.latitude, result.longitude)
|
that.getOnlineDistrict(result.latitude, result.longitude)
|
||||||
var obj = {
|
var obj = {
|
||||||
latitude:result.latitude,longitude:result.longitude
|
latitude:result.latitude,longitude:result.longitude
|
||||||
}
|
}
|
||||||
|
|
@ -82,9 +89,9 @@ Page({
|
||||||
},
|
},
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
that.setData({
|
that.setData({
|
||||||
district:res.result.address_component.city
|
// district:res.result.address_component.city
|
||||||
})
|
})
|
||||||
console.log(this.district,'asda');
|
console.log(res,'asda');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -3,18 +3,8 @@
|
||||||
<view class="mapTop">
|
<view class="mapTop">
|
||||||
<view class="inputVal">
|
<view class="inputVal">
|
||||||
<input class="weui-input" placeholder-class="phcolor" value="{{inputVal}}" bindinput="handlePos" placeholder="输入关键字查询"/>
|
<input class="weui-input" placeholder-class="phcolor" value="{{inputVal}}" bindinput="handlePos" placeholder="输入关键字查询"/>
|
||||||
<!--关键词输入提示列表渲染-->
|
|
||||||
<view wx:for="{{suggestion}}" wx:key="index">
|
<image style="width: 20px; height: 20px;margin-left: 10rpx; margin-top: 5rpx;" src="./images/icon1.png"></image>
|
||||||
<!--绑定回填事件-->
|
|
||||||
<view>
|
|
||||||
<!--根据需求渲染相应数据-->
|
|
||||||
<!--渲染地址title-->
|
|
||||||
<view style="text-align:center;" bindtap="backfill" id="{{index}}">{{item.title}}</view>
|
|
||||||
<!--渲染详细地址-->
|
|
||||||
<view style="font-size:12px;color:#666;text-align:center;">{{item.addr}}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<van-icon class="el-icon-microphone"></van-icon>
|
|
||||||
</view>
|
</view>
|
||||||
<map id="myMap"
|
<map id="myMap"
|
||||||
latitude="{{district.latitude}}"
|
latitude="{{district.latitude}}"
|
||||||
|
|
@ -24,12 +14,12 @@
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<view class="image">
|
<view class="image">
|
||||||
<image mode="aspectFill" src=""></image>
|
<image mode="aspectFill" src="./images/qiao.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<view class="text">
|
<view class="text">
|
||||||
<span style="font-size:15px;font-weight: 600;">董滨枢纽小桥</span>
|
<span style="font-size:15px;font-weight: 600;">董滨枢纽小桥</span>
|
||||||
<view style="display: flex;align-items: center">
|
<view style="display: flex;align-items: center" bindtap='handleRouter'>
|
||||||
<span style="font-size:14px;color:rgb(105, 131, 255)">详情</span>
|
<span style="font-size:14px;color:rgb(105, 131, 255)">详情</span>
|
||||||
<van-icon name="arrow" style="font-size:14px;color:rgb(105, 131, 255);margin: 8rpx 0 0 5rpx;"/>
|
<van-icon name="arrow" style="font-size:14px;color:rgb(105, 131, 255);margin: 8rpx 0 0 5rpx;"/>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -50,4 +40,18 @@
|
||||||
最大预警级别:红色预警。
|
最大预警级别:红色预警。
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<!--关键词输入提示列表渲染-->
|
||||||
|
<view class="listPos">
|
||||||
|
<view wx:for="{{suggestion}}" wx:key="index" >
|
||||||
|
<!--绑定回填事件-->
|
||||||
|
<view>
|
||||||
|
<!--根据需求渲染相应数据-->
|
||||||
|
<!--渲染地址title-->
|
||||||
|
<view style="text-align:center;" bindtap="backfill" id="{{index}}">{{item.title}}</view>
|
||||||
|
<!--渲染详细地址-->
|
||||||
|
<view style="font-size:12px;color:#666;text-align:center;">{{item.addr}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -89,3 +89,11 @@
|
||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
/* width: calc(fit-content + 10rpx) ; */
|
/* width: calc(fit-content + 10rpx) ; */
|
||||||
}
|
}
|
||||||
|
.listPos{
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
position: fixed;
|
||||||
|
top: 100rpx;
|
||||||
|
left: 0;
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
@ -56,11 +56,7 @@
|
||||||
"compileType": "miniprogram",
|
"compileType": "miniprogram",
|
||||||
"libVersion": "2.19.4",
|
"libVersion": "2.19.4",
|
||||||
"appid": "wxa9783cf92ee95a72",
|
"appid": "wxa9783cf92ee95a72",
|
||||||
<<<<<<< HEAD
|
|
||||||
"projectname": "bridgespace-app",
|
"projectname": "bridgespace-app",
|
||||||
=======
|
|
||||||
"projectname": "inlandVessel-app",
|
|
||||||
>>>>>>> cdc45140f836a5564ba6d4f94c3e4d7e23d3df72
|
|
||||||
"condition": {},
|
"condition": {},
|
||||||
"editorSetting": {
|
"editorSetting": {
|
||||||
"tabIndent": "insertSpaces",
|
"tabIndent": "insertSpaces",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue