Compare commits
No commits in common. 'master1' and 'master' have entirely different histories.
@ -1,31 +0,0 @@
|
||||
/*
|
||||
* Eslint config file
|
||||
* Documentation: https://eslint.org/docs/user-guide/configuring/
|
||||
* Install the Eslint extension before using this feature.
|
||||
*/
|
||||
module.exports = {
|
||||
env: {
|
||||
es6: true,
|
||||
browser: true,
|
||||
node: true,
|
||||
},
|
||||
ecmaFeatures: {
|
||||
modules: true,
|
||||
},
|
||||
parserOptions: {
|
||||
ecmaVersion: 2018,
|
||||
sourceType: 'module',
|
||||
},
|
||||
globals: {
|
||||
wx: true,
|
||||
App: true,
|
||||
Page: true,
|
||||
getCurrentPages: true,
|
||||
getApp: true,
|
||||
Component: true,
|
||||
requirePlugin: true,
|
||||
requireMiniProgram: true,
|
||||
},
|
||||
// extends: 'eslint:recommended',
|
||||
rules: {},
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
# Windows
|
||||
[Dd]esktop.ini
|
||||
Thumbs.db
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# macOS
|
||||
.DS_Store
|
||||
.fseventsd
|
||||
.Spotlight-V100
|
||||
.TemporaryItems
|
||||
.Trashes
|
||||
|
||||
# Node.js
|
||||
node_modules/
|
@ -1,47 +0,0 @@
|
||||
{
|
||||
"pages": [
|
||||
"pages/index/index",
|
||||
"pages/search/search",
|
||||
"pages/photo/photo",
|
||||
"pages/user/user",
|
||||
"pages/map/map"
|
||||
],
|
||||
"window": {
|
||||
"backgroundTextStyle": "light",
|
||||
"navigationBarTitleText": "区域地图",
|
||||
"navigationBarTextStyle": "white"
|
||||
},
|
||||
"tabBar": {
|
||||
"color": "#999",
|
||||
"selectedColor": "#ff5767",
|
||||
"backgroundColor": "#fbfbfb",
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/index/index",
|
||||
"text": "首页",
|
||||
"iconPath": "images/zhuye.jpg",
|
||||
"selectedIconPath": "images/zhuye-o.jpg"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/map/map",
|
||||
"text": "地图",
|
||||
"iconPath": "images/map-o.png",
|
||||
"selectedIconPath": "images/map.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/user/user",
|
||||
"text": "我的",
|
||||
"iconPath": "images/me.jpg",
|
||||
"selectedIconPath": "images/me-o.jpg"
|
||||
}
|
||||
]
|
||||
},
|
||||
"permission": {
|
||||
"scope.userLocation": {
|
||||
"desc": "你的位置信息将用于小程序位置接口的效果展示"
|
||||
}
|
||||
},
|
||||
"style": "v2",
|
||||
"sitemapLocation": "sitemap.json",
|
||||
"lazyCodeLoading": "requiredComponents"
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
Page({
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
// 跳转到搜索页面
|
||||
search: function () {
|
||||
wx.navigateTo({
|
||||
url: '../../pages/search/search'
|
||||
})
|
||||
}
|
||||
})
|
||||
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
<view class='page_row' bindtap="suo">
|
||||
<view class="search">
|
||||
<view class="df search_arr">
|
||||
<icon class="searchcion" size='16' type='search'></icon>
|
||||
<input class="sousuo" disabled placeholder="搜索" bindtap='search'/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -1,33 +0,0 @@
|
||||
.search{
|
||||
width: 98%;
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
.search_arr {
|
||||
border: 1px solid #d0d0d0;
|
||||
border-radius: 10rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.search_arr input{
|
||||
margin-left: 60rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.sousuo {
|
||||
padding-left: 38%;
|
||||
width: 15%;
|
||||
line-height: 150%;
|
||||
text-align: center;
|
||||
}
|
||||
.page_row{
|
||||
display: flex;
|
||||
flex-direction: row
|
||||
}
|
||||
.searchcion {
|
||||
margin: 10rpx 10rpx 10rpx 10rpx;
|
||||
position: absolute;
|
||||
margin-left:38%;
|
||||
z-index: 2;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
text-align: center;
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
.ec-canvas {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
@ -1,105 +0,0 @@
|
||||
export default class WxCanvas {
|
||||
constructor(ctx, canvasId, isNew, canvasNode) {
|
||||
this.ctx = ctx;
|
||||
this.canvasId = canvasId;
|
||||
this.chart = null;
|
||||
this.isNew = isNew
|
||||
if (isNew) {
|
||||
this.canvasNode = canvasNode;
|
||||
}
|
||||
else {
|
||||
this._initStyle(ctx);
|
||||
}
|
||||
|
||||
// this._initCanvas(zrender, ctx);
|
||||
|
||||
this._initEvent();
|
||||
}
|
||||
|
||||
getContext(contextType) {
|
||||
if (contextType === '2d') {
|
||||
return this.ctx;
|
||||
}
|
||||
}
|
||||
|
||||
// canvasToTempFilePath(opt) {
|
||||
// if (!opt.canvasId) {
|
||||
// opt.canvasId = this.canvasId;
|
||||
// }
|
||||
// return wx.canvasToTempFilePath(opt, this);
|
||||
// }
|
||||
|
||||
setChart(chart) {
|
||||
this.chart = chart;
|
||||
}
|
||||
|
||||
attachEvent() {
|
||||
// noop
|
||||
}
|
||||
|
||||
detachEvent() {
|
||||
// noop
|
||||
}
|
||||
|
||||
_initCanvas(zrender, ctx) {
|
||||
zrender.util.getContext = function () {
|
||||
return ctx;
|
||||
};
|
||||
|
||||
zrender.util.$override('measureText', function (text, font) {
|
||||
ctx.font = font || '12px sans-serif';
|
||||
return ctx.measureText(text);
|
||||
});
|
||||
}
|
||||
|
||||
_initStyle(ctx) {
|
||||
ctx.createRadialGradient = () => {
|
||||
return ctx.createCircularGradient(arguments);
|
||||
};
|
||||
}
|
||||
|
||||
_initEvent() {
|
||||
this.event = {};
|
||||
const eventNames = [{
|
||||
wxName: 'touchStart',
|
||||
ecName: 'mousedown'
|
||||
}, {
|
||||
wxName: 'touchMove',
|
||||
ecName: 'mousemove'
|
||||
}, {
|
||||
wxName: 'touchEnd',
|
||||
ecName: 'mouseup'
|
||||
}, {
|
||||
wxName: 'touchEnd',
|
||||
ecName: 'click'
|
||||
}];
|
||||
|
||||
eventNames.forEach(name => {
|
||||
this.event[name.wxName] = e => {
|
||||
const touch = e.touches[0];
|
||||
this.chart.getZr().handler.dispatch(name.ecName, {
|
||||
zrX: name.wxName === 'tap' ? touch.clientX : touch.x,
|
||||
zrY: name.wxName === 'tap' ? touch.clientY : touch.y
|
||||
});
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
set width(w) {
|
||||
if (this.canvasNode) this.canvasNode.width = w
|
||||
}
|
||||
set height(h) {
|
||||
if (this.canvasNode) this.canvasNode.height = h
|
||||
}
|
||||
|
||||
get width() {
|
||||
if (this.canvasNode)
|
||||
return this.canvasNode.width
|
||||
return 0
|
||||
}
|
||||
get height() {
|
||||
if (this.canvasNode)
|
||||
return this.canvasNode.height
|
||||
return 0
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 16 KiB |
@ -1,26 +0,0 @@
|
||||
Page({
|
||||
data: {
|
||||
imgurl:""
|
||||
},
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
browse:function()
|
||||
{
|
||||
let that=this;
|
||||
wx.chooseMedia({
|
||||
count: 1,
|
||||
mediaType: ['image','video'],
|
||||
sourceType: ['album', 'camera'],
|
||||
maxDuration: 30,
|
||||
camera: 'back',
|
||||
success(res) {
|
||||
console.log(res.tempFiles[0].tempFilePath)
|
||||
wx.setStorageSync('path',res.tempFiles[0].tempFilePath)
|
||||
wx.switchTab({
|
||||
url: '../map/map',
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"SearchInput":"../../components/SearchInput/SearchInput"
|
||||
},
|
||||
"navigationBarTitleText": "主页",
|
||||
"navigationBarBackgroundColor": "#ff5767"
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
<!--搜索框结构-->
|
||||
<view class="search">
|
||||
<SearchInput></SearchInput>
|
||||
</view>
|
||||
<!--拍照框结构-->
|
||||
<view class="photo">
|
||||
<button style="height:100%;width: 50%; background-color: pink; " bindtap="browse">
|
||||
<image mode="heightFix" src="/images/paizhao.jpg"></image>
|
||||
<text style="padding: 50rpx;">请拍摄地图</text>
|
||||
</button>
|
||||
</view>
|
||||
<view>
|
||||
<image src="{{imgurl}}" mode="aspecFill" />
|
||||
</view>
|
@ -1,2 +0,0 @@
|
||||
.photo button{padding: 150px 0;}
|
||||
.photo image{height: 150px;}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"ec-canvas": "../../ec-canvas/ec-canvas"
|
||||
},
|
||||
"navigationBarTitleText": "地图",
|
||||
"navigationBarBackgroundColor": "#ff5767"
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
<scroll-view class="img" style="height: 90vh; width: 100vw">
|
||||
<image
|
||||
src="{{path}}"
|
||||
style="height: {{old_height}}; width: {{old_width}}; transform: translate({{translateX}}px, {{translateY}}px) scale({{scale}}) rotate({{rotate}}deg);"
|
||||
catch:touchstart="touchStart"
|
||||
catch:touchmove="touchMove"
|
||||
catch:touchend="touchEnd"
|
||||
/>
|
||||
</scroll-view>
|
||||
|
||||
|
||||
<!--经纬度-->
|
||||
<form bindsubmit="weizhi">
|
||||
<view class="jingwei">
|
||||
<view>
|
||||
经度<input type="text" name="jingdu" value='{{jingdu}}'/>
|
||||
</view>
|
||||
<view>
|
||||
纬度<input type="text" name="weidu" value='{{weidu}}'/>
|
||||
</view>
|
||||
</view>
|
||||
</form>
|
@ -1,12 +0,0 @@
|
||||
.img image{
|
||||
width: 100%;
|
||||
}
|
||||
.jingwei{
|
||||
padding: 0rpx 20rpx;
|
||||
display: flex;
|
||||
position:fixed;
|
||||
bottom:0;
|
||||
}
|
||||
.jingwei input{
|
||||
flex-direction: row;
|
||||
}
|
@ -1,91 +0,0 @@
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
// 拍摄按钮按下, 执行record 触发拍摄
|
||||
record(){
|
||||
this.data.cameraContext = wx.createCameraContext()
|
||||
this.data.cameraContext.takePhoto({
|
||||
quality:"high", //高质量的图片
|
||||
success: res => {
|
||||
//res.tempImagePath照片文件在手机内的的临时路径
|
||||
let tempImagePath = res.tempImagePath
|
||||
wx.saveFile({
|
||||
tempFilePath: tempImagePath,
|
||||
success: function (res) {
|
||||
//返回保存时的临时路径 res.savedFilePath
|
||||
const savedFilePath = res.savedFilePath
|
||||
// 保存到本地相册
|
||||
wx.saveImageToPhotosAlbum({
|
||||
filePath: savedFilePath,
|
||||
})
|
||||
},
|
||||
//保存失败回调(比如内存不足)
|
||||
fail: console.log
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
error(e) {
|
||||
console.log(e.detail)
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
<camera class="camera" frame-size="large"></camera>
|
||||
<view class="out">
|
||||
<button class="record" bindtap="record" ></button>
|
||||
</view>
|
||||
|
||||
|
@ -1,19 +0,0 @@
|
||||
.camera{
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
.out .record{
|
||||
width: 180rpx;
|
||||
height: 160rpx;
|
||||
}
|
||||
.record{
|
||||
position: fixed;
|
||||
bottom: 10rpx;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
margin: auto;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
@ -1,66 +0,0 @@
|
||||
// pages/search/search.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
@ -1,5 +0,0 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "搜索",
|
||||
"navigationBarBackgroundColor": "#ff5767"
|
||||
}
|
@ -1 +0,0 @@
|
||||
|
@ -1 +0,0 @@
|
||||
/* pages/search/search.wxss */
|
@ -1,66 +0,0 @@
|
||||
// pages/user/user.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
@ -1,5 +0,0 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "我的",
|
||||
"navigationBarBackgroundColor": "#ff5767"
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
<!--pages/user/user.wxml-->
|
||||
<text>pages/user/user.wxml</text>
|
@ -1 +0,0 @@
|
||||
/* pages/user/user.wxss */
|
@ -1,77 +0,0 @@
|
||||
{
|
||||
"description": "项目配置文件",
|
||||
"packOptions": {
|
||||
"ignore": []
|
||||
},
|
||||
"setting": {
|
||||
"urlCheck": true,
|
||||
"es6": true,
|
||||
"enhance": true,
|
||||
"postcss": true,
|
||||
"preloadBackgroundData": false,
|
||||
"minified": true,
|
||||
"newFeature": false,
|
||||
"coverView": true,
|
||||
"nodeModules": false,
|
||||
"autoAudits": false,
|
||||
"showShadowRootInWxmlPanel": true,
|
||||
"scopeDataCheck": false,
|
||||
"uglifyFileName": false,
|
||||
"checkInvalidKey": true,
|
||||
"checkSiteMap": true,
|
||||
"uploadWithSourceMap": true,
|
||||
"compileHotReLoad": false,
|
||||
"lazyloadPlaceholderEnable": false,
|
||||
"useMultiFrameRuntime": true,
|
||||
"useApiHook": true,
|
||||
"useApiHostProcess": true,
|
||||
"babelSetting": {
|
||||
"ignore": [],
|
||||
"disablePlugins": [],
|
||||
"outputPath": ""
|
||||
},
|
||||
"useIsolateContext": true,
|
||||
"userConfirmedBundleSwitch": false,
|
||||
"packNpmManually": false,
|
||||
"packNpmRelationList": [],
|
||||
"minifyWXSS": true,
|
||||
"disableUseStrict": false,
|
||||
"minifyWXML": true,
|
||||
"showES6CompileOption": false,
|
||||
"useCompilerPlugins": false,
|
||||
"ignoreUploadUnusedFiles": true
|
||||
},
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "2.22.1",
|
||||
"appid": "wxf09dd26283e176c6",
|
||||
"projectname": "map-photo",
|
||||
"debugOptions": {
|
||||
"hidedInDevtools": []
|
||||
},
|
||||
"scripts": {},
|
||||
"staticServerOptions": {
|
||||
"baseURL": "",
|
||||
"servePath": ""
|
||||
},
|
||||
"isGameTourist": false,
|
||||
"condition": {
|
||||
"search": {
|
||||
"list": []
|
||||
},
|
||||
"conversation": {
|
||||
"list": []
|
||||
},
|
||||
"game": {
|
||||
"list": []
|
||||
},
|
||||
"plugin": {
|
||||
"list": []
|
||||
},
|
||||
"gamePlugin": {
|
||||
"list": []
|
||||
},
|
||||
"miniprogram": {
|
||||
"list": []
|
||||
}
|
||||
}
|
||||
}
|
@ -1,53 +0,0 @@
|
||||
{
|
||||
"setting": {},
|
||||
"condition": {
|
||||
"plugin": {
|
||||
"list": []
|
||||
},
|
||||
"game": {
|
||||
"list": []
|
||||
},
|
||||
"gamePlugin": {
|
||||
"list": []
|
||||
},
|
||||
"miniprogram": {
|
||||
"list": [
|
||||
{
|
||||
"name": "",
|
||||
"pathName": "pages/photo/photo",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"pathName": "pages/index/index",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"pathName": "pages/search/search",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"pathName": "pages/user/user",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"pathName": "pages/map/map",
|
||||
"query": "",
|
||||
"scene": null,
|
||||
"launchMode": "default"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
|
||||
"rules": [{
|
||||
"action": "allow",
|
||||
"page": "*"
|
||||
}]
|
||||
}
|