| | |
| | | //app.js |
| | | const GdMap = require('./utils/amap-wx') |
| | | //const apiHost = 'http://39.108.148.228:80/user'; |
| | | const apiHost = 'http://192.168.110.70:80/user' |
| | | const apiHost = 'http://221.182.45.100:8999/user'; |
| | | // const apiHost = 'http://192.168.110.70:80/user' |
| | | App({ |
| | | // 这里这么写,是要在其他界面监听,而不是在app.js中监听,而且这个监听方法,需要一个回调方法。 |
| | | watch(method) { |
| | |
| | | initSocket() { |
| | | let that = this; |
| | | that.globalData.localSocket = wx.connectSocket({ |
| | | url: "ws://192.168.110.70:9090/websocket", |
| | | url: "ws://221.182.45.100:8999/websocket", |
| | | // url: "wss://39.108.148.228:9090/websocket", |
| | | // url: "wss://okyueche.com:9090/websocket", |
| | | }); |
| | |
| | | cityName:wx.getStorageSync('cityName')||'', |
| | | userLatitude:wx.getStorageSync('latitude')||'', |
| | | userLongitude:wx.getStorageSync('longitude')||'', |
| | | //Url:'http://39.108.148.228:80/user', |
| | | Url:'http://192.168.110.70:80/user', |
| | | Url:'http://221.182.45.100:8999/user', |
| | | // Url:'http://192.168.110.70:80/user', |
| | | localSocket: {}, |
| | | callback: function() {}, |
| | | sockTaskStatus: false, |
| | |
| | | formLocation: true, |
| | | changeStartName: "", |
| | | show_block: false, |
| | | |
| | | //左侧个人中心 |
| | | personalList: [ |
| | | { |
| | |
| | | showQueryLogisticsNumber: false, |
| | | sameUserInfo: true,// |
| | | sameUserInfoObj: {},//小件物流个人信息 |
| | | scanTaxiData: {},//扫码打车查询站点数据 |
| | | scanTaxiData: {},//扫码打车查询站点数据, |
| | | siteLat:'', |
| | | siteLon:'' |
| | | }, |
| | | //包车 |
| | | clickPhone(e) { |
| | |
| | | }, |
| | | //扫一扫 |
| | | scan() { |
| | | if (wx.getStorageSync('token') !== "") { |
| | | // if (wx.getStorageSync('token') !== "") { |
| | | wx.scanCode({ |
| | | success: (res) => { |
| | | console.log(res, '----******'); |
| | | let scene = decodeURIComponent(res.path || ''); |
| | | if (res.scanType == 'WX_CODE') { |
| | | let arr = res.path.split('=') |
| | | let index = res.path.split('=').length - 1 |
| | | let arr = scene.split('=') |
| | | let index = scene.split('=').length - 1 |
| | | unit.post(app.globalData.Url + "/base/taxi/getSiteInfo", { |
| | | siteId: arr[index] |
| | | }) |
| | | .then((res) => { |
| | | this.setData({ |
| | | scanTaxiData: res.data.data |
| | | scanTaxiData: res.data.data, |
| | | siteLat:res.data.data.latitude, |
| | | siteLon:res.data.data.longitude, |
| | | showFrist:false, |
| | | }) |
| | | }) |
| | | return |
| | |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | | wx.navigateTo({ |
| | | url: '/pages/index/index', |
| | | }) |
| | | } |
| | | // } else { |
| | | // wx.navigateTo({ |
| | | // url: '/pages/index/index', |
| | | // }) |
| | | // } |
| | | }, |
| | | changeInfo() { |
| | | wx.navigateTo({ |
| | |
| | | url: `../../pages/waiting/waiting?startAddress=${startAddress}&startLat=${startLat}&startLon=${startLon}&orderType=2&time=${unit.formatTimeUser(new Date())}&scanCallTaxi=1`, |
| | | }) |
| | | } else if (res.data.code == 600) { |
| | | console.log('//////////////++++++++++++',); |
| | | |
| | | |
| | | wx.navigateTo({ |
| | | url: '/pages/index/index?autoCallTaxi=1', |
| | |
| | | onLoad: function (options) { |
| | | // 解码并提取 scene 中的 siteId |
| | | const scene = decodeURIComponent(options.scene || ''); |
| | | |
| | | const params = {}; |
| | | scene.split('&').forEach(pair => { |
| | | const [key, value] = pair.split('='); |
| | |
| | | }) |
| | | .then((res) => { |
| | | this.setData({ |
| | | scanTaxiData: res.data.data |
| | | scanTaxiData: res.data.data, |
| | | siteLat:res.data.data.latitude, |
| | | siteLon:res.data.data.longitude, |
| | | showFrist:false, |
| | | }) |
| | | }) |
| | | } |
| | |
| | | goWaiting(e) { |
| | | if (e.currentTarget.dataset.state <= 5) { |
| | | wx.navigateTo({ |
| | | url: '../../pages/waiting/waiting?where=' + "myTrip" + "&orderID=" + e.currentTarget.dataset.orderid + "&state=" + e.currentTarget.dataset.state + '&orderType=' + e.currentTarget.dataset.ordertype + "&onekey=" + '0' |
| | | url: '../../pages/waiting/waiting?where=' + "myTrip" + "&orderID=" + e.currentTarget.dataset.orderid + "&state=" + e.currentTarget.dataset.state + '&orderType=' + e.currentTarget.dataset.ordertype + "&onekey=" + '0' + "&scanCallTaxi=1" |
| | | }) |
| | | } else if (e.currentTarget.dataset.state == 12) { |
| | | wx.navigateTo({ |
| | |
| | | <view class="use_car_text" hidden="{{!nowOrder}}" data-orderid="{{orderIdIng}}" data-ordertype="{{orderTypeIng}}" data-self="{{selfOrder}}" data-state="{{stateInd}}" catchtap="goWaiting">您有一笔订单正在进行中</view> |
| | | </view> |
| | | <scroll-view class="bottom_box" scroll-top="{{index}}" style='height:{{scrollHeight}}px;top:160rpx' scroll-y="true"> |
| | | <map enable-scroll show-location="true" polyline="{{polyline}}" id="map4select" include-points='{{points}}' polyline="{{polyline}}" style="height:{{endChangeCar?60:70}}vh;width:100%" class="mapDom" markers="{{markers}}" latitude="{{latitude}}" longitude="{{longitude}}" bindregionchange="regionchange"> |
| | | <map enable-scroll show-location="true" polyline="{{polyline}}" id="map4select" include-points='{{points}}' polyline="{{polyline}}" style="height:{{endChangeCar?60:70}}vh;width:100%" class="mapDom" markers="{{markers}}" latitude="{{siteLat?siteLat:latitude}}" longitude="{{siteLon?siteLon:longitude}}" bindregionchange="regionchange"> |
| | | <view class="map_center" wx:if="{{showLocationIcon}}"> |
| | | <image src="../../img/icon_location.png" mode="widthFix" class="cover-image"></image> |
| | | </view> |
| | |
| | | </view> |
| | | <!--同城小件物流 跨城小件物流--> |
| | | <view wx:if="{{busId==5||busId==4}}" class="abvoad" style="top:{{sendHeight+80}}px;height:{{scrollHeight-sendHeight}}px"> |
| | | <map id="someCityMap" bindregionchange="startChangeMap" style="height:70vh;width:100%" show-location latitude="{{latitude}}" longitude="{{longitude}}" subkey="QYRBZ-GUGWW-A3XRS-OV3VK-22K6K-7RB3Q" layer-style="1"> |
| | | <map id="someCityMap" bindregionchange="startChangeMap" style="height:70vh;width:100%" show-location latitude="{{siteLat?siteLat:latitude}}" longitude="{{siteLon?siteLon:longitude}}" subkey="QYRBZ-GUGWW-A3XRS-OV3VK-22K6K-7RB3Q" layer-style="1"> |
| | | <view class="map_center"> |
| | | <image src="../../img/icon_location.png" mode="widthFix" class="cover-image"></image> |
| | | </view> |
| | |
| | | } |
| | | this.setData({ |
| | | waitTing: true, |
| | | markers |
| | | markers, |
| | | isShowTid:true, |
| | | showShowDom:false, |
| | | waitTimeNow:false |
| | | }) |
| | | } |
| | | if (this.data.orderType == 3 && setPeople) { |
| | |
| | | <!--一键下单--> |
| | | |
| | | <view style="width:100;height:100%" wx:if="{{onekey=='1'}}"> |
| | | <view style="width:100;height:100%" wx:if="{{!showShowDom}}"> |
| | | <view style="width:100;height:100%;" wx:if="{{!showShowDom}}"> |
| | | <map show-location="true" wx:if="{{onekey=='1'&&state<5}}" class="waitTing_maps" longitude="{{startLon}}" polyline="{{polyline}}" include-points='{{points}}' latitude="{{startLat}}" markers="{{markers}}" id="map4select" markers="{{markers}}"> |
| | | <view class="waitTing_Time" wx:if="{{waitTing}}">正为您寻找车辆 等待<span>{{waitTime}}</span></view> |
| | | </map> |
| | |
| | | </view> |
| | | </view> |
| | | <!--当前定位--> |
| | | {{isShowTid}} |
| | | <image src="../../img/location_icon.png" class="location_icon" style="bottom:{{ endAddress ? btuBottom+132 : btuBottom+230}}rpx" catchtap="getMylocation"></image> |
| | | <view class="close_order" catchtap="close_order" hidden="{{!isShowTid}}" style="bottom:{{btuBottom+28}}rpx">取消订单</view> |
| | | <view class="waitView" wx:if="{{isShowTid && !waitTimeNow}}" style="bottom:{{btuBottom+28}}rpx">司机接单,距预约地点大约 |
| | | <view class="waitView" wx:if="{{isShowTid && !waitTimeNow && state !=1}}" style="bottom:{{btuBottom+28}}rpx">司机接单,距预约地点大约 |
| | | <span>{{reservationMileage||0}}</span>公里,大约<span>{{reservationTime||0}}</span>分钟到达 |
| | | </view> |
| | | <view class="waitView" wx:if="{{waitTimeNow && endAddress && !isOrderSource8}}" style="bottom:{{btuBottom+28}}rpx">司机到达预约地点,已等您<span>{{waitTimeTime}}</span></view> |
| | |
| | | |
| | | const ajax = new Ajax({ |
| | | // baseURL: 'http://192.168.0.49:81/api', |
| | | // baseURL:"http://192.168.0.80:80/user" |
| | | baseURL:"http://221.182.45.100:8999/user" |
| | | // baseURL:"http://39.108.148.228:80/user" |
| | | baseURL:'http://192.168.110.70:80/user', |
| | | // baseURL:'http://192.168.110.70:80/user', |
| | | }) |
| | | |
| | | /** |