forked from xiaobinwu/dj
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
288 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// pages/home/home.js | ||
Page({ | ||
data:{}, | ||
onLoad:function(options){ | ||
// 页面初始化 options为页面跳转所带来的参数 | ||
}, | ||
onReady:function(){ | ||
// 页面渲染完成 | ||
}, | ||
onShow:function(){ | ||
// 页面显示 | ||
}, | ||
onHide:function(){ | ||
// 页面隐藏 | ||
}, | ||
onUnload:function(){ | ||
// 页面关闭 | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<!--pages/home/home.wxml--> | ||
<text>pages/home/home.wxml</text> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* pages/home/home.wxss */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,24 @@ | ||
//index.js | ||
//获取应用实例 | ||
/* 承载页 */ | ||
var app = getApp() | ||
|
||
// 引入SDK核心类 | ||
var QQMapWX = require('../../lib/qqmap-wx-jssdk.min.js'); | ||
|
||
// 实例化API核心类 | ||
var demo = new QQMapWX({ | ||
key: 'LHVBZ-DQVWW-C2YRC-REKYI-HRUV7-JPFYV' // 必填 | ||
}); | ||
|
||
|
||
var bearer = require('../../utils/bearer.js'); | ||
var util = require('../../utils/util.js'); | ||
var ports = require('../../utils/ports.js'); | ||
Page({ | ||
data: { | ||
motto: 'Hello World', | ||
userInfo: {} | ||
}, | ||
//事件处理函数 | ||
bindViewTap: function() { | ||
wx.navigateTo({ | ||
url: '../logs/logs' | ||
}) | ||
}, | ||
onLoad: function () { | ||
console.log('onLoad') | ||
var that = this | ||
//调用应用实例的方法获取全局数据 | ||
app.getUserInfo(function(userInfo){ | ||
//更新数据 | ||
that.setData({ | ||
userInfo:userInfo | ||
}) | ||
}); | ||
|
||
// // 调用接口 | ||
// demo.reverseGeocoder({ | ||
// location: { | ||
// latitude: 39.984060, | ||
// longitude: 116.307520 | ||
// }, | ||
// success: function(res) { | ||
// console.log(res); | ||
// }, | ||
// fail: function(res) { | ||
// console.log(res); | ||
// }, | ||
// complete: function(res) { | ||
// console.log(res); | ||
// } | ||
// }); | ||
|
||
wx.request({ | ||
url: 'https://www.wzhouhui.com/dj/Location/getLocation', //仅为示例,并非真实的接口地址 | ||
method: 'post', | ||
data: { | ||
lng: '116.307520' , | ||
lat: '39.984060' | ||
}, | ||
success: function(res) { | ||
console.log(res) | ||
} | ||
}); | ||
|
||
bearer.init(); | ||
var ajaxCfg={ | ||
method: 'POST', | ||
url: ports.getLocation, | ||
data:{ | ||
lat:22.516232, | ||
lng:113.921143, | ||
location_addr: "粤海大厦", | ||
region_id: "77", | ||
region_name:"深圳市" | ||
} | ||
} | ||
util.wxRequest(ajaxCfg, true).then(res =>{ | ||
console.log(res) | ||
}) | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,2 @@ | ||
<!--index.wxml--> | ||
<view class="container"> | ||
<view bindtap="bindViewTap" class="userinfo"> | ||
<image class="userinfo-avatar" src="{{userInfo.avatarUrl}}" background-size="cover"></image> | ||
<text class="userinfo-nickname">{{userInfo.nickName}}</text> | ||
</view> | ||
<view class="usermotto"> | ||
<text class="user-motto">{{motto}}</text> | ||
</view> | ||
</view> | ||
<image src="../../image/loading-super.gif"></image> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,10 @@ | ||
/**index.wxss**/ | ||
.userinfo { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
} | ||
|
||
.userinfo-avatar { | ||
width: 128rpx; | ||
height: 128rpx; | ||
margin: 20rpx; | ||
border-radius: 50%; | ||
} | ||
|
||
.userinfo-nickname { | ||
color: #aaa; | ||
} | ||
|
||
.usermotto { | ||
margin-top: 200px; | ||
image{ | ||
width: 60rpx; | ||
height: 60rpx; | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
transform: translate(-50%, -50%); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// pages/list/list.js | ||
Page({ | ||
data:{}, | ||
onLoad:function(options){ | ||
// 页面初始化 options为页面跳转所带来的参数 | ||
}, | ||
onReady:function(){ | ||
// 页面渲染完成 | ||
}, | ||
onShow:function(){ | ||
// 页面显示 | ||
}, | ||
onHide:function(){ | ||
// 页面隐藏 | ||
}, | ||
onUnload:function(){ | ||
// 页面关闭 | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<!--pages/list/list.wxml--> | ||
<text>pages/list/list.wxml</text> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* pages/list/list.wxss */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// pages/more/more.js | ||
Page({ | ||
data:{}, | ||
onLoad:function(options){ | ||
// 页面初始化 options为页面跳转所带来的参数 | ||
}, | ||
onReady:function(){ | ||
// 页面渲染完成 | ||
}, | ||
onShow:function(){ | ||
// 页面显示 | ||
}, | ||
onHide:function(){ | ||
// 页面隐藏 | ||
}, | ||
onUnload:function(){ | ||
// 页面关闭 | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<!--pages/more/more.wxml--> | ||
<text>pages/more/more.wxml</text> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* pages/more/more.wxss */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.