pull/19/head
wny 2 years ago
parent 460f278ba0
commit 86c1ef5994

@ -0,0 +1,19 @@
# Build and Release Folders
bin/
bin-debug/
bin-release/
[Oo]bj/ # FlashDevelop obj
[Bb]in/ # FlashDevelop bin
# Other files and folders
.settings/
# Executables
*.swf
*.air
*.ipa
*.apk
# Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties`
# should NOT be excluded as they contain compiler settings and other important
# information for Eclipse / Flash Builder.

@ -0,0 +1,24 @@
# wechat-weapp-mapdemo
微信小程序开发mapdemo地图导航、marker标注
版本信息:
微信web开发者工具 `v0.15.152900`
## Screenshot
![](./image/screenshot1.png)
![](./image/screenshot2.png)
![](./image/navigator.jpg)
![](./image/screenshot-marker.png)
---
## License
MIT

@ -0,0 +1,30 @@
//app.js
App({
onLaunch: function () {
//调用API从本地缓存中获取数据
var logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)
},
getUserInfo:function(cb){
var that = this;
if(this.globalData.userInfo){
typeof cb == "function" && cb(this.globalData.userInfo)
}else{
//调用登录接口
wx.login({
success: function () {
wx.getUserInfo({
success: function (res) {
that.globalData.userInfo = res.userInfo;
typeof cb == "function" && cb(that.globalData.userInfo)
}
})
}
});
}
},
globalData:{
userInfo:null
}
})

@ -0,0 +1,39 @@
{
"pages":[
"pages/login/login",
"pages/location/location",
"pages/Find directions/Find directions",
"pages/text/text"
],
"window":{
"backgroundTextStyle":"light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "login",
"navigationBarTextStyle":"black"
},
"tabBar": {
"color": "#dddddd",
"selectedColor": "#3cc51f",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"list": [{
"pagePath": "pages/location/location",
"iconPath": "image/wechat.png",
"selectedIconPath": "image/locate.png",
"text": "导航"
},{
"pagePath": "pages/Find directions/Find directions",
"iconPath": "image/map.png",
"selectedIconPath": "image/map_active.png",
"text": "查询路线"
},{
"pagePath": "pages/text/text",
"iconPath": "image/locate.png",
"selectedIconPath": "image/locateHL.png",
"text": "信息栏"
}
]
},
"debug": true
}

@ -0,0 +1,10 @@
/**app.wxss**/
.container {
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
padding: 200rpx 0;
box-sizing: border-box;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

@ -0,0 +1,25 @@
{
"name": "wechat-weapp-mapdemo",
"version": "1.0.0",
"description": "微信小程序demo,地图",
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/giscafer/wechat-weapp-mapdemo.git"
},
"keywords": [
"微信小程序demo"
],
"author": "giscafer",
"license": "ISC",
"bugs": {
"url": "https://github.com/giscafer/wechat-weapp-mapdemo/issues"
},
"homepage": "https://github.com/giscafer/wechat-weapp-mapdemo#readme",
"dependencies": {
"mapbox-gl": "^0.24.0"
}
}

@ -0,0 +1,26 @@
//index.js
//获取应用实例
var app = getApp()
Page({
data: {
motto: '中航大查询路线系统',
userInfo: {},
appInfo:{
logoUrl:'../../image/logo.png',
title:'查询路线'
}
},
//事件处理函数
bindViewTap: function() {
wx.navigateTo({
url: '../location/location'
})
},
onLoad: function () {
console.log('onLoad')
var that = this
that.setData({
appInfo:this.data.appInfo
})
}
})

@ -0,0 +1,10 @@
<!--index.wxml-->
<view class="container">
<view bindtap="bindViewTap" class="userinfo">
<image class="userinfo-avatar" src="{{appInfo.logoUrl}}" background-size="cover"></image>
<text class="userinfo-nickname">{{appInfo.title}}</text>
</view>
<view class="usermotto">
<text class="user-motto">{{motto}}</text>
</view>
</view>

@ -0,0 +1,21 @@
/**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;
}

@ -0,0 +1,727 @@
var click =true
Page({
/**
* 页面的初始数据
*/
data: {
longitude: 112.5840817937609,
latitude: 37.42334029843902,
scale:16,
ishow:true
},
// 校门
hx_door: function () {
this.setData({
hx_door: true,
hx_canteen: false,
hx_supermarket: false,
hx_teach: false,
hx_hospital: false,
hx_playground: false,
hx_library: false,
hx_dorm: false,
ishow:false,
latitude: 37.42334029843902, //经度
longitude: 112.5840817937609, //纬度
scale: 16,
markers: [{
iconPath: '../../images/hxLocation.png',
latitude: 37.42460923822909,
longitude: 112.57850807958519,
width: 20,
height: 30
}, {
iconPath: '../../images/hxLocation.png',
latitude: 37.42505982099957,
longitude: 112.58448746351345,
width: 20,
height: 30
},{
iconPath: '../../images/hxLocation.png',
latitude: 37.423356091749176,
longitude: 112.59020697584626,
width: 20,
height: 30
},{
iconPath: '../../images/hxLocation.png',
latitude: 37.420850652498494,
longitude: 112.58636394568849,
width: 20,
height: 30
}, {
iconPath: '../../images/hxLocation.png',
latitude: 37.42046830521278,
longitude: 112.59089438639249,
width: 20,
height: 30
}]
})
},
// 餐厅
hx_canteen: function () {
this.setData({
hx_door: false,
hx_canteen: true,
hx_supermarket: false,
hx_teach: false,
hx_hospital: false,
hx_playground: false,
hx_library: false,
hx_dorm: false,
ishow: false,
latitude: 37.42334029843902, //经度
longitude: 112.5840817937609, //纬度
scale: 16,
markers: [{
iconPath: '../../images/hxLocation.png',
latitude: 37.42217098294637,
longitude: 112.58554120048987,
width: 20,
height: 30
},
{
iconPath: '../../images/hxLocation.png',
latitude: 37.424741,
longitude: 112.580423,
width: 20,
height: 30
}, {
iconPath: '../../images/hxLocation.png',
latitude: 37.421674,
longitude: 112.591431,
width: 20,
height: 30
}, {
iconPath: '../../images/hxLocation.png',
latitude: 37.421563,
longitude: 112.585369,
width: 20,
height: 30
}, {
iconPath: '../../images/hxLocation.png',
latitude: 37.421137,
longitude: 112.585305,
width: 20,
height: 30
}
]
})
},
/******超市***/
hx_supermarket: function () {
this.setData({
hx_door: false,
hx_canteen: false,
hx_supermarket: true,
hx_teach: false,
hx_hospital: false,
hx_playground: false,
hx_library: false,
hx_dorm: false,
ishow: false,
latitude: 37.42334029843902, //经度
longitude: 112.5840817937609, //纬度
scale: 16,
markers: [{
iconPath: '../../images/hxLocation.png', //大超市
latitude: 37.422066, /**大超市 */
longitude: 112.585868,
width: 20,
height: 30
}, {
iconPath: '../../images/hxLocation.png', //进门超市
latitude: 37.421014, /**进门超市*/
longitude: 112.585155,
width: 20,
height: 30
}, {
iconPath: '../../images/hxLocation.png', //进门超市
latitude: 37.421546, /**进门超市*/
longitude: 112.591259,
width: 20,
height: 30
}
]
})
},
/****************************************教学楼***************************************** */
hx_teach: function () {
this.setData({
hx_door: false,
hx_canteen: false,
hx_supermarket: false,
hx_teach: true,
hx_hospital: false,
hx_playground: false,
hx_library: false,
hx_dorm: false,
ishow: false,
latitude: 37.42334029843902, //经度
longitude: 112.5840817937609, //纬度
scale: 16,
markers: [{
iconPath: '../../images/hxLocation.png', //教学楼1
latitude: 37.423821,
longitude: 112.585863,
width: 20,
height: 30
}, {
iconPath: '../../images/hxLocation.png', //教学楼2
latitude: 37.424622,
longitude: 112.581378,
width: 20,
height: 30
}, {
iconPath: '../../images/hxLocation.png', //实验楼3
latitude: 37.425074,
longitude: 112.583610,
width: 20,
height: 30
}, {
iconPath: '../../images/hxLocation.png', //实验楼4
latitude: 37.424545,
longitude: 112.585037,
width: 20,
height: 30
}, {
iconPath: '../../images/hxLocation.png', //办公楼5
latitude: 37.424230,
longitude: 112.585917,
width: 20,
height: 30
}, {
iconPath: '../../images/hxLocation.png', //办公楼6
latitude: 37.423016,
longitude: 112.586625,
width: 20,
height: 30
}, {
iconPath: '../../images/hxLocation.png', //办公楼7
latitude: 37.421550,
longitude: 112.582945,
width: 20,
height: 30
}, {
iconPath: '../../images/hxLocation.png', //办公楼8
latitude: 37.423335,
longitude: 112.584801,
width: 20,
height: 30
}, {
iconPath: '../../images/hxLocation.png', //办公楼9
latitude: 37.421452,
longitude: 112.580155,
width: 20,
height: 30
}, {
iconPath: '../../images/hxLocation.png', //办公楼10
latitude: 37.421555,
longitude: 112.579050,
width: 20,
height: 30
}, {
iconPath: '../../images/hxLocation.png', //办公楼11
latitude: 37.422398,
longitude: 112.578599,
width: 20,
height: 30
}, {
iconPath: '../../images/hxLocation.png', //办公楼12
latitude: 37.424882,
longitude: 112.582687,
width: 20,
height: 30
}, {
iconPath: '../../images/hxLocation.png', //办公楼13
latitude: 37.421883,
longitude: 112.587698,
width: 20,
height: 30
}
]
})
},
/****************************************医 务 室***************************************** */
hx_hospital: function () {
this.setData({
hx_door: false,
hx_canteen: false,
hx_supermarket: false,
hx_teach: false,
hx_hospital: true,
hx_playground: false,
hx_library: false,
hx_dorm: false,
ishow: false,
latitude: 37.42334029843902, //经度
longitude: 112.5840817937609, //纬度
scale: 16,
markers: [{
iconPath: '../../images/hxLocation.png',
latitude: 37.425022,
longitude: 112.585133,
width: 20,
height: 30
}]
})
},
/****************************************农大 体 育 场***************************************** */
hx_playground: function () {
this.setData({
hx_door: false,
hx_canteen: false,
hx_supermarket: false,
hx_teach: false,
hx_hospital: false,
hx_playground: true,
hx_library: false,
hx_dorm: false,
ishow: false,
latitude: 37.42334029843902, //经度
longitude: 112.5840817937609, //纬度
scale: 16,
markers: [{
iconPath: '../../images/hxLocation.png',
latitude: 37.421947, /**大操场 */
longitude: 112.589071,
width: 20,
height: 30
},
{
iconPath: '../../images/hxLocation.png',
latitude: 37.425636,
longitude: 112.582322, /**小操场 */
width: 20,
height: 30
}]
})
},
/****************************************农大 图 书 馆***************************************** */
hx_library: function () {
this.setData({
hx_door: false,
hx_canteen: false,
hx_supermarket: false,
hx_teach: false,
hx_hospital: false,
hx_playground: false,
hx_library: true,
hx_dorm: false,
ishow: false,
latitude: 37.42334029843902, //经度
longitude: 112.5840817937609, //纬度
scale: 16,
markers: [{
iconPath: '../../images/hxLocation.png',
latitude: 37.424051, /**图书馆 */
longitude: 112.580541,
width: 20,
height: 30
}, {
iconPath: '../../images/hxLocation.png',
latitude: 37.424524, /**图书馆 */
longitude: 112.583980,
width: 20,
height: 30
}]
})
},
/****************************************农大 宿 舍***************************************** */
hx_dorm: function () {
this.setData({
hx_door: false,
hx_canteen: false,
hx_supermarket: false,
hx_teach: false,
hx_hospital: false,
hx_playground: false,
hx_library: false,
hx_dorm: true,
ishow: false,
latitude: 37.42334029843902, //经度
longitude: 112.5840817937609, //纬度
scale: 16,
markers: [{
iconPath: '../../images/hxLocation.png',
latitude: 37.422066, /**学生公寓1 */
longitude: 112.584833,
width: 20,
height: 30
}, {
iconPath: '../../images/hxLocation.png',
latitude: 37.422394, /**学生公寓2 */
longitude: 112.586399,
width:20,
height: 30
}, {
iconPath: '../../images/hxLocation.png',
latitude: 37.421751, /**学生公寓3 */
longitude: 112.590798,
width: 20,
height: 30
}, {
iconPath: '../../images/hxLocation.png',
latitude: 37.425917, /**学生公寓4 */
longitude: 112.580520,
width: 20,
height: 30
}, {
iconPath: '../../images/hxLocation.png',
latitude: 37.421261, /**活动中心宿舍楼*/
longitude: 112.587896,
width: 20,
height: 30
}, {
iconPath: '../../images/hxLocation.png',
latitude: 37.421090, /**洗浴中心宿舍楼 */
longitude: 112.589441,
width: 20,
height: 30
}
]
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
go: function (e) {
var id = e.currentTarget.id; //获取id
switch (id) {
/*农大校门门*/
case "door1":
wx.openLocation({ /*使用微信内置地图查看位置*/
latitude: 37.42460923822909,
longitude: 112.57850807958519,
scale: 25
})
break;
case "door2":
wx.openLocation({ /*使用微信内置地图查看位置*/
latitude: 37.42505982099957,
longitude: 112.58448746351345,
scale: 25
})
break;
case "door3":
wx.openLocation({ /*使用微信内置地图查看位置*/
latitude: 37.423356091749176,
longitude: 112.59020697584626,
scale: 25
})
break;
case "door4":
wx.openLocation({ /*使用微信内置地图查看位置*/
latitude: 37.420850652498494,
longitude: 112.58636394568849,
scale: 25
})
break;
case "door5":
wx.openLocation({ /*使用微信内置地图查看位置*/
latitude: 37.42046830521278,
longitude: 112.59089438639249,
scale: 25
})
break;
/*农大餐饮*/
case "canteen1":
wx.openLocation({ /*使用微信内置地图查看位置*/
latitude: 37.42217098294637,
longitude: 112.58554120048987,
scale: 25
})
break;
case "canteen2":
wx.openLocation({ /*使用微信内置地图查看位置*/
latitude: 37.421674,
longitude: 112.591431,
scale: 25
})
break;
case "canteen3":
wx.openLocation({ /*使用微信内置地图查看位置*/
latitude: 37.424741,
longitude: 112.580423,
scale: 25
})
break;
case "canteen4":
wx.openLocation({ /*使用微信内置地图查看位置*/
latitude: 37.421563,
longitude: 112.585369,
scale: 25
})
break;
case "canteen5":
wx.openLocation({ /*使用微信内置地图查看位置*/
latitude: 37.421137,
longitude: 112.585305,
scale: 25
})
break;
/*农大超市*/
case "supermarket1":
wx.openLocation({ /*使用微信内置地图查看位置*/
latitude: 37.422066, /**大超市 */
longitude: 112.585868,
scale: 25
})
break;
case "supermarket2":
wx.openLocation({ /*使用微信内置地图查看位置*/
latitude: 37.421014, /**进门超市*/
longitude: 112.585155,
scale: 25
})
break;
case "supermarket3":
wx.openLocation({ /*使用微信内置地图查看位置*/
latitude: 37.421546, /**进门超市*/
longitude: 112.591259,
scale: 25
})
break;
/**农大教学楼 */
case "teach1":
wx.openLocation({ /*使用微信内置地图查看位置*/
latitude: 37.423821,
longitude: 112.585863,
scale: 25
})
break;
case "teach2":
wx.openLocation({ /*使用微信内置地图查看位置*/
latitude: 37.424622,
longitude: 112.581378,
scale: 25
})
break;
case "teach3":
wx.openLocation({ /*使用微信内置地图查看位置*/
latitude: 37.425074,
longitude: 112.583610,
scale: 25
})
break;
case "teach4":
wx.openLocation({ /*使用微信内置地图查看位置*/
latitude: 37.424545,
longitude: 112.585037,
scale: 25
})
break;
case "teach5":
wx.openLocation({ /*使用微信内置地图查看位置*/
latitude: 37.424230,
longitude: 112.585917,
scale: 25
})
break;
case "teach6":
wx.openLocation({ /*使用微信内置地图查看位置*/
latitude: 37.423016,
longitude: 112.586625,
scale: 25
})
break;
case "teach7":
wx.openLocation({ /*使用微信内置地图查看位置*/
latitude: 37.421550,
longitude: 112.582945,
scale: 25
})
break;
case "teach8":
wx.openLocation({ /*使用微信内置地图查看位置*/
latitude: 37.423335,
longitude: 112.584801,
scale: 25
})
break;
case "teach9":
wx.openLocation({ /*使用微信内置地图查看位置*/
latitude: 37.421452,
longitude: 112.580155,
scale: 25
})
break;
case "teach10":
wx.openLocation({ /*使用微信内置地图查看位置*/
latitude: 37.421555,
longitude: 112.579050,
scale: 25
})
break;
case "teach11":
wx.openLocation({ /*使用微信内置地图查看位置*/
latitude: 37.422398,
longitude: 112.578599,
scale: 25
})
break;
case "teach12":
wx.openLocation({ /*使用微信内置地图查看位置*/
latitude: 37.424882,
longitude: 112.582687,
scale: 25
})
break;
case "teach13":
wx.openLocation({ /*使用微信内置地图查看位置*/
latitude: 37.421883,
longitude: 112.587698,
scale: 25
})
break;
/**农大医务室 */
case "hospital1":
wx.openLocation({
latitude: 37.425022,
longitude: 112.585133,
scale: 25
})
break;
/**农大体育场 */
case "playground1":
wx.openLocation({
latitude: 37.421947, /**大操场 */
longitude: 112.589071,
scale: 25
})
break;
case "playground2":
wx.openLocation({
latitude: 37.425636,
longitude: 112.582322, /**小操场 */
scale: 25
})
break;
/**农大图书馆*/
case "library1":
wx.openLocation({
latitude: 37.424051, /**图书馆 */
longitude: 112.580541,
scale: 25
})
break;
case "library2":
wx.openLocation({
latitude: 37.424524, /**图书馆 */
longitude: 112.583980,
scale: 25
})
break;
/**农大宿舍楼*/
case "dorm1":
wx.openLocation({
latitude: 37.422066, /**学生公寓1 */
longitude: 112.584833,
scale: 25
})
break;
case "dorm2":
wx.openLocation({
latitude: 37.422394, /**学生公寓2 */
longitude: 112.586399,
scale: 25
})
break;
case "dorm3":
wx.openLocation({
latitude: 37.421751, /**学生公寓3 */
longitude: 112.590798,
scale: 25
})
break;
case "dorm4":
wx.openLocation({
latitude: 37.425917, /**学生公寓4 */
longitude: 112.580520,
scale: 25
})
break;
case "dorm5":
wx.openLocation({
latitude: 37.421261, /**活动中心宿舍楼*/
longitude: 112.587896,
scale: 25
})
break;
case "dorm6":
wx.openLocation({
latitude: 37.421090, /**洗浴中心宿舍楼 */
longitude: 112.589441,
scale: 25
})
break;
}
}
})

@ -0,0 +1,417 @@
<!--pages/sxauguide/sxauguide.wxml-->
<scroll-view scroll-x class='scrollx' >
<navigator open-type="redirect" catchtap='hx_door'>校门</navigator>
<navigator open-type="redirect" catchtap='hx_canteen'>餐饮</navigator>
<navigator open-type="redirect" catchtap='hx_supermarket'>超市</navigator>
<navigator open-type="redirect" catchtap='hx_teach'>教学楼</navigator>
<navigator open-type="redirect" catchtap='hx_hospital'>医院</navigator>
<navigator open-type="redirect" catchtap='hx_playground'>体育场</navigator>
<navigator open-type="redirect" catchtap='hx_library'>图书馆</navigator>
<navigator open-type="redirect" catchtap='hx_dorm'>学生公寓</navigator>
</scroll-view>
<!--地图-->
<!--longitude经度 latitude纬度 -->
<map
id="map"
longitude="{{longitude}}"
latitude="{{latitude}}"
scale="{{scale}}"
style="width: 100%; height: 300px;"
markers='{{markers}}'
show-location='true'
bindcallouttap='click'
bindmarkertap='background'
></map>
<!-- 校门 -->
<view class='bottom' style='bottom:{{bootom}};' wx:if="{{hx_door}}">
<cover-view class='hx_bottomtext'>校门</cover-view>
<view class="page__bd">
<view class="weui-cells__title"></view>
<view class="weui-cells weui-cells_after-title">
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 西门</view>
<cover-image id='door1' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 旧北门</view>
<cover-image id='door2' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 新北门</view>
<cover-image id='door3' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 前南门(可过)</view>
<cover-image id='door4' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 后南门(一般不开)</view>
<cover-image id='door5' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
</view>
</view>
</view>
<!--农大餐饮-->
<view class='bottom' style='bottom:{{bootom}};' wx:if="{{hx_canteen}}">
<cover-view class='hx_bottomtext'>餐饮</cover-view>
<view class="page__bd">
<view class="weui-cells__title"></view>
<view class="weui-cells weui-cells_after-title">
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 谷园</view>
<cover-image id='canteen1' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 碧桃园</view>
<cover-image id='canteen2' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 教职工餐厅</view>
<cover-image id='canteen3' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 小木屋</view>
<cover-image id='canteen4' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 怡膳园</view>
<cover-image id='canteen5' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
</view>
</view>
</view>
<!--农大超市-->
<view class='bottom' style='bottom:{{bootom}};' wx:if="{{hx_supermarket}}">
<cover-view class='hx_bottomtext'>超市</cover-view>
<view class="page__bd">
<view class="weui-cells__title"></view>
<view class="weui-cells weui-cells_after-title">
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 寸草心超市</view>
<cover-image id='supermarket1' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 周边小超市</view>
<cover-image id='supermarket2' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 周边小超市</view>
<cover-image id='supermarket3' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
</view>
</view>
</view>
<!--农大教学楼-->
<view class='bottom' style='bottom:{{bootom}};' wx:if="{{hx_teach}}">
<cover-view class='hx_bottomtext'>教学楼</cover-view>
<view class="page__bd">
<view class="weui-cells__title"></view>
<view class="weui-cells weui-cells_after-title">
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 农学楼1号</view>
<cover-image id='teach1' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 实验大楼</view>
<cover-image id='teach2' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 崇学楼</view>
<cover-image id='teach3' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 理化楼</view>
<cover-image id='teach4' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 教学北楼</view>
<cover-image id='teach5' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 教学主楼5号楼</view>
<cover-image id='teach6' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 6号楼</view>
<cover-image id='teach7' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 动物科技学院</view>
<cover-image id='teach8' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 崇实楼</view>
<cover-image id='teach9' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 工学院</view>
<cover-image id='teach10' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 资源环境学院</view>
<cover-image id='teach11' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 嘉桂教学楼</view>
<cover-image id='teach12' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 体育部</view>
<cover-image id='teach13' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
</view>
</view>
</view>
<!--农大校医院-->
<view class='bottom' style='bottom:{{bootom}};' wx:if="{{hx_hospital}}">
<cover-view class='hx_bottomtext'>医院</cover-view>
<view class="page__bd">
<view class="weui-cells__title"></view>
<view class="weui-cells weui-cells_after-title">
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 校医院</view>
<cover-image id='hospital1' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
</view>
</view>
</view>
<!--农大体育场-->
<view class='bottom' style='bottom:{{bootom}};' wx:if="{{hx_playground}}">
<cover-view class='hx_bottomtext'>体育场</cover-view>
<view class="page__bd">
<view class="weui-cells__title"></view>
<view class="weui-cells weui-cells_after-title">
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 大操场</view>
<cover-image id='playground1' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 小操场</view>
<cover-image id='playground2' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
</view>
</view>
</view>
<!--农大图书馆-->
<view class='bottom' style='bottom:{{bootom}};' wx:if="{{hx_library}}">
<cover-view class='hx_bottomtext'>图书馆</cover-view>
<view class="page__bd">
<view class="weui-cells__title"></view>
<view class="weui-cells weui-cells_after-title">
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 图书馆</view>
<cover-image id='library1' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">山西农业大学 - 亭兰图书馆</view>
<cover-image id='library2' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
</view>
</view>
</view>
<!--农大学生公寓-->
<view class='bottom' style='bottom:{{bootom}};' wx:if="{{hx_dorm}}">
<cover-view class='hx_bottomtext'>学生公寓</cover-view>
<view class="page__bd">
<view class="weui-cells__title"></view>
<view class="weui-cells weui-cells_after-title">
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">学生公寓 1-5</view>
<cover-image id='dorm1' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">学生公寓 6-10</view>
<cover-image id='dorm2' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">学生公寓 11-19</view>
<cover-image id='dorm3' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">学生公寓 21-23</view>
<cover-image id='dorm4' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">游泳馆 - (活动中心)</view>
<cover-image id='dorm5' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
<navigator url="" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__hd">
<image src="../../images/xm.jpg" class='hx_img'></image>
</view>
<view class="weui-cell__bd">睿智体育馆 - (活动中心)</view>
<cover-image id='dorm6' style='width:25px;height:25px' catchtap='go' src='../../images/gps.jpg' mode='aspectFit'></cover-image>
</navigator>
</view>
</view>
</view>

@ -0,0 +1,62 @@
/* pages/sxauguide/sxauguide.wxss */
/*顶部滑块*/
.scrollx{
display: flex; /*水平居中*/
white-space: nowrap; /* 文本不会换行,文本会在在同一行上继续,直到遇到 <br> 标签为止。*/
}
.scrollx navigator{
display: inline-block; /*垂直居中,多个孩子共享一行*/
padding-left: 20rpx;
padding-right: 20rpx;
background: #2d572b;
color: white;
font-family: "微软雅黑";
font-size: 15px;
padding-top: 10px;
padding-bottom: 10px;
}
.bottom{
position:relative; /*相对定位*/
float: left;
width: 100%;
}
.hx_bottomtext{
display: block;
position: relative;
font-family: "微软雅黑";
font-size: 15px;
width: 100%;
top: 10px;
left: 45%;
color: #ed5e53;
margin-bottom: 20px;
}
/*控制地点列表的单行展示形式*/
.hxdoor{
position: relative;
display: flex; /*水平居中*/
width: 100%;
height: 50px;
}
/*控制单行图片位置*/
.hx_img{
margin-right: 10px;
float: left;
width: 80px;
height: 40px;
}
/*控制单行文字*/
.hxdoor_text{
font-size: 16px;
font-family: "微软雅黑";
color:#333333;
margin-left: 20rpx;
margin-top: 5rpx;
}
/*控制go图标*/
.go{
width:20px ;
height:20px;
}

@ -0,0 +1,28 @@
//获取应用实例
var app = getApp()
Page({
data: {
user_name:'',
user_password:''
},
//输入用户名
userNameChange: function (e) {
this.data.user_name = e.detail.value;
},
//输入密码
userPasswordChange: function (e) {
this.data.user_password = e.detail.value;
},
showLive: function () {
wx.reLaunch({
url: '../Find directions/Find directions',
})
},
showpage: function(){
wx.reLaunch(
{
url:'../Find directions/Find directions'
}
)
}
})

@ -0,0 +1,32 @@
<view class="page">
<view class="page__bd">
<view class="weui-toptips weui-toptips_warn" wx:if="{{showTopTips}}">错误提示</view>
<view class="weui-cells__title">登录</view>
<view class="weui-cells weui-cells_after-title">
<view class="weui-cell weui-cell_input">
<view class="weui-cell__hd">
<view class="weui-label">用户名</view>
</view>
<view class="weui-cell__bd">
<input class="weui-input" placeholder="请输入用户名" name="user_name" value="{{user_name}}" bindblur="userNameChange" />
</view>
</view>
<view class="weui-cell weui-cell_input weui-cell_vcode">
<view class="weui-cell__hd">
<view class="weui-label">密码</view>
</view>
<view class="weui-cell__bd">
<input password type="text" class="weui-input" placeholder="请输入密码" name="user_password" value="{{user_password}}" bindblur="userPasswordChange" />
</view>
</view>
</view>
<view class="weui-btn-area" bindtap="showLive">
<button class="weui-btn" type="primary">用户登陆</button>
</view>
<view class="weui-btn-area" bindtap="showpage">
<button class="weui-btn" type="primary">管理员登陆</button>
</view>
<view class="weui-cells__title" >注册,忘记密码请联系qq:xx</view>
</view>
</view>

@ -0,0 +1,20 @@
/**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: red;
}
.usermotto {
margin-top: 200px;
}

@ -0,0 +1,66 @@
// pages/logs/logs.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

@ -0,0 +1,2 @@
<!--pages/logs/logs.wxml-->
<text>pages/logs/logs.wxml</text>

@ -0,0 +1,77 @@
// map.js
let schoolData = require('../../resources/gis-school')
Page({
data: {
centerX:113.3245211,
centerY:23.10229,
markers: [],
controls: [{
id: 1,
iconPath: '/image/location-control.png',
position: {
left: 0,
top:10,
width: 40,
height: 40
},
clickable: true
}]
},
onReady: function (e) {
// 使用 wx.createMapContext 获取 map 上下文
this.mapCtx = wx.createMapContext('myMap')
},
onLoad: function () {
console.log('地图定位!')
let that = this
wx.getLocation({
type: 'gcj02', //返回可以用于wx.openLocation的经纬度
success:(res)=>{
console.log(res)
let latitude = res.latitude;
let longitude = res.longitude;
let marker=this.createMarker(res);
this.setData({
centerX:longitude,
centerY:latitude,
markers:this.getSchoolMarkers()
})
}
});
},
regionchange(e) {
console.log(e.type)
},
markertap(e) {
console.log(e)
},
controltap(e) {
console.log(e.controlId)
this.moveToLocation()
},
getSchoolMarkers(){
let markers=[];
for(let item of schoolData){
let marker=this.createMarker(item);
markers.push(marker)
}
return markers;
},
moveToLocation: function () {
this.mapCtx.moveToLocation()
},
createMarker(point){
let latitude = point.latitude;
let longitude = point.longitude;
let marker= {
iconPath: "/image/location.png",
id:point.id || 0,
name:point.name || '',
latitude: latitude,
longitude: longitude,
width: 25,
height: 48
};
return marker;
}
})

@ -0,0 +1,3 @@
{
"navigationBarTitleText": "地图标注"
}

@ -0,0 +1 @@
<map id="map" scale="5" controls="{{controls}}" bindcontroltap="controltap" markers="{{markers}}" bindmarkertap="markertap" bindregionchange="regionchange" show-location style="width: 100%; height: 580px;"></map>

@ -0,0 +1,66 @@
// pages/text/text.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

@ -0,0 +1,2 @@
<!--pages/text/text.wxml-->
<text>pages/text/text.wxml</text>

@ -0,0 +1,29 @@
{
"compileType": "miniprogram",
"setting": {
"coverView": true,
"es6": false,
"postcss": true,
"minified": true,
"enhance": true,
"showShadowRootInWxmlPanel": true,
"packNpmRelationList": [],
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"ignoreUploadUnusedFiles": true
},
"condition": {},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
},
"libVersion": "2.27.0",
"packOptions": {
"ignore": [],
"include": []
},
"appid": "wx5e77d1bb9e24f179"
}

@ -0,0 +1,7 @@
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "wechat-weapp-mapdemo-master",
"setting": {
"compileHotReLoad": false
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

@ -0,0 +1,21 @@
function formatTime(date) {
var year = date.getFullYear()
var month = date.getMonth() + 1
var day = date.getDate()
var hour = date.getHours()
var minute = date.getMinutes()
var second = date.getSeconds();
return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
}
function formatNumber(n) {
n = n.toString()
return n[1] ? n : '0' + n
}
module.exports = {
formatTime: formatTime
}
Loading…
Cancel
Save