| | |
| | | <!-- <u-button type="info" @click="acc">测试</u-button> --> |
| | | <!-- <web-view :src="urls" @message="message"></web-view> --> |
| | | <map :scale='18' id="myMap" style="width: 100%" :style="{height: mapHeight + 'px'}" :markers="markersCom" |
| | | :longitude="longitude" :latitude="latitude" :circles="circlesCom" :polyline="mypolylinesCom" |
| | | :longitude="longitude" :latitude="latitude" :circles="circlesCom" :polyline="mypolylines" |
| | | show-location="true"> |
| | | <cover-view class="dingwBut" @click="mapControlsBack"> |
| | | <cover-image src="./map/img/dingwei.png" @click="mapControlsBack"> |
| | | </cover-image> |
| | | </cover-view> |
| | | |
| | | </map> |
| | | <view id="Umain" :style="{ height: activeHeight}" @touchstart="touchstart" @touchend="touchend" |
| | | @touchmove="touchmove"> |
| | |
| | | {{ourData.num==ourData.jnum?"人数已满":'我参与'}} |
| | | </u-button> |
| | | </view> |
| | | <u-popup v-model="showIn" mode="center" border-radius="14" z-index='1000001'> |
| | | <view class="Info2"> |
| | | <view class="Info4">是否参加活动</view> |
| | | <view class="Info3"> |
| | | <u-button type="primary" @click="openAPP('oks')">参加</u-button> |
| | | <u-button type="error" @click="openAPP('nos')">取消</u-button> |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | |
| | | </view> |
| | | <u-popup v-model="showIn" mode="bottom" border-radius="14" z-index='1000001' :mask-close-able="true"> |
| | | <view class="Info2"> |
| | | <view class="Info4">是否参加活动</view> |
| | | <u-button class="Info5" type="primary" @click="openAPP('oks')">参加</u-button> |
| | | <u-button class="Info5" type="error" @click="openAPP('nos')">取消</u-button> |
| | | <!--<view class="Info3"> |
| | | </view> --> |
| | | </view> |
| | | </u-popup> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | longitude: 115.8995839881188, |
| | | circles: [], //圆 |
| | | markers: [], //标记点 |
| | | mypolylines: [], |
| | | mypolylines: [{ //指定一系列坐标点,从数组第一项连线至最后一项 |
| | | points: [], |
| | | color: "#FE0000", //线的颜色 |
| | | width: 10, //线的宽度 |
| | | dottedLine: false, //是否虚线 |
| | | arrowLine: false, //带箭头的线 开发者工具暂不支持该属性 |
| | | }, |
| | | { //指定一系列坐标点,从数组第一项连线至最后一项 |
| | | points: [], |
| | | color: "#10a4ff", //线的颜色 |
| | | width: 10, //线的宽度 |
| | | dottedLine: false, //是否虚线 |
| | | arrowLine: false, //带箭头的线 开发者工具暂不支持该属性 |
| | | }, |
| | | ], |
| | | useTime: null, |
| | | useTimeSet: null, |
| | | times: 3000, |
| | |
| | | mapControlsBack() { |
| | | // console.log(1111) |
| | | this.getLocationInfo("notSet"); |
| | | // this.bye = false; |
| | | // this.timeBegin(1); |
| | | }, |
| | | touchstart(e) { |
| | | // console.log(e.changedTouches[0].clientY) |
| | |
| | | } |
| | | } else { |
| | | this.showIn = true; |
| | | // this.openAPP('oks') |
| | | // this.$confirm('是否参与活动:' + this.ourData.rname + "?", '提示', { |
| | | // confirmButtonText: '确定', |
| | | // cancelButtonText: '取消', |
| | |
| | | // } |
| | | // }, |
| | | timeBegin(val) { |
| | | console.log(this.bye) |
| | | // console.log(this.bye) |
| | | let that = this; |
| | | if (this.bye) { |
| | | console.log("再见") |
| | | if (that.useTime) { |
| | |
| | | } |
| | | return |
| | | } |
| | | let that = this; |
| | | if (this.useTime) { |
| | | return |
| | | } else { |
| | | //加入自己的路线基础 索引1 |
| | | // this.mypolylines[1] = { //指定一系列坐标点,从数组第一项连线至最后一项 |
| | | // points: [], |
| | | // color: "#10a4ff", //线的颜色 |
| | | // width: 10, //线的宽度 |
| | | // dottedLine: false, //是否虚线 |
| | | // arrowLine: false, //带箭头的线 开发者工具暂不支持该属性 |
| | | // } |
| | | if (val == 1) { |
| | | that.getLocationInfo(); |
| | | } |
| | |
| | | }); |
| | | }, |
| | | getLocationInfo(val) { |
| | | var that = this |
| | | var that = this; |
| | | uni.getLocation({ |
| | | type: 'wgs84', |
| | | isHighAccuracy: true, |
| | |
| | | intlat: [res.longitude, res.latitude] |
| | | } |
| | | that.timeBeginSet(d) //30秒送数据 |
| | | //加入绘制路线 |
| | | let useDataPosition = { |
| | | latitude: res.latitude, |
| | | longitude: res.longitude |
| | | } |
| | | let lat = useDataPosition.latitude + ''; |
| | | let long = useDataPosition.longitude + ''; |
| | | let oldLat = that.mypolylines[1].points.length == 0 ? 1 : that.mypolylines[1].points[ |
| | | that.mypolylines[1].points.length - |
| | | 1].latitude + ''; |
| | | let oldLong = that.mypolylines[1].points.length == 0 ? 1 : that.mypolylines[1].points[ |
| | | that.mypolylines[1].points.length - |
| | | 1].longitude + ''; |
| | | if (lat != oldLat && long != oldLong) { //判断如果两次位置不一样 那就添加 |
| | | that.mypolylines[1].points.push(useDataPosition); |
| | | } |
| | | // console.log(lat != oldLat && long != oldLong, 222222222222); |
| | | // console.log(that.mypolylines[1].points.length) |
| | | } |
| | | } |
| | | }); |
| | |
| | | markersCom() { |
| | | return this.markers.slice(0); |
| | | }, |
| | | mypolylinesCom() { |
| | | return this.mypolylines.slice(0); |
| | | }, |
| | | // mypolylinesCom() { |
| | | // // console.log(this.mypolylines,"333333333333333333333") |
| | | // return this.mypolylines.slice(0); |
| | | // }, |
| | | socketValue() { |
| | | return this.$store.state.socketValue; |
| | | } |
| | |
| | | }) |
| | | } |
| | | // setTimeout(() => { |
| | | this.mypolylines[0] = { //指定一系列坐标点,从数组第一项连线至最后一项 |
| | | points: ourline, |
| | | color: "#FE0000", //线的颜色 |
| | | width: 10, //线的宽度 |
| | | dottedLine: false, //是否虚线 |
| | | arrowLine: false, //带箭头的线 开发者工具暂不支持该属性 |
| | | } |
| | | // this.mypolylines[0] = { //指定一系列坐标点,从数组第一项连线至最后一项 |
| | | // points: ourline, |
| | | // color: "#FE0000", //线的颜色 |
| | | // width: 10, //线的宽度 |
| | | // dottedLine: false, //是否虚线 |
| | | // arrowLine: false, //带箭头的线 开发者工具暂不支持该属性 |
| | | // } |
| | | that.mypolylines[0].points = ourline; |
| | | // console.log(this.mypolylines) |
| | | // }, 1000) |
| | | this.showWindow(); |
| | |
| | | |
| | | |
| | | .Info2 { |
| | | width: 200px; |
| | | height: 100px; |
| | | width: 100%; |
| | | // height: 100px; |
| | | padding: 0 10px; |
| | | |
| | | .Info3 { |
| | |
| | | text-align: center; |
| | | height: 50px; |
| | | } |
| | | |
| | | .Info5 { |
| | | margin-bottom: 10px !important; |
| | | width: 70%; |
| | | } |
| | | } |
| | | |
| | | .notOpens { |