fix
13404089107
2025-01-16 fb6e62d3f24c3c29ca19e57b9a8f459874cc9052
fix
24个文件已修改
3个文件已添加
1970 ■■■■ 已修改文件
app.js 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
img/xuanzhong@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
pages/carDown/carDown.js 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/carDown/carDown.wxml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/carDown/carDown.wxss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/changeCity/changeCity.js 159 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/closeTip/closeTip.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/getLocation/getLocation.js 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/getLocation/getLocation.wxml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.js 423 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.wxml 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.wxss 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/moneyInfo/moneyInfo.wxml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/myTrip/okTrip/okTrip.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/myTrip/okTrip/okTrip.wxml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/myTrip/wait-pj/wait-pj.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/myTrip/wait-pj/wait-pj.wxml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/setLocation/setLocation.js 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/setLocation/setLocation.wxml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/waiting/waiting.js 235 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/waiting/waiting.wxml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/waiting/waiting.wxss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
project.config.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/ajax.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/bmap-wx.js 452 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/bmap-wx.min.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/util.js 415 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app.js
@@ -3,7 +3,11 @@
// const apiHost = 'http://39.108.148.228:80/user'; 
// const apiHost = 'https://okyueche.com:443/user'
// const apiHost = 'http://120.220.4.138:9591/user'
const apiHost = 'https://xn95128.cn/user'
// const apiHost = 'https://xn95128.cn/user'
// const apiHost = 'http://192.168.110.34:7777/user'
const apiHost = 'http://221.182.45.100:7777/user'
// const apiHost = 'https://zhentonggongsi.com/user'
@@ -29,12 +33,16 @@
     initSocket() {
      let that = this;
      that.globalData.localSocket = wx.connectSocket({
        // url: "ws://192.168.0.80:9090/websocket",
        // url: "ws://192.168.110.34:7777/websocket",
        url: "ws://221.182.45.100:9978",
        // url: "ws://221.182.45.100:900",
        url: "wss://xn95128.cn/websocket",
        // url: "wss://xn95128.cn/websocket",
      });
      console.log('shuju//////////////////',this.globalData.localSocket);
      that.globalData.localSocket.onOpen(function(res) {
        console.log(that.globalData.localSocket)
        console.log('----//////-------------',that.globalData.localSocket)
          console.log("WebSocket连接已打开!readyState=" + that.globalData.localSocket.readyState);
          that.globalData.sockTaskStatus = true;
          let msg = {
@@ -462,11 +470,12 @@
    cityName:wx.getStorageSync('cityName')||'',
    userLatitude:wx.getStorageSync('latitude')||'',
    userLongitude:wx.getStorageSync('longitude')||'',
    // Url:'http://192.168.0.80:80/user',
    // Url:'http://192.168.110.34:7777/user',
    Url:'http://221.182.45.100:7777/user',
    // Url:'http://39.108.148.228:80/user',
    // Url:'https://okyueche.com:443/user',
    // Url:'http://120.220.4.138:9591/user',
    Url:'https://xn95128.cn/user',
    // Url:'https://xn95128.cn/user',
    
    localSocket: {},
    callback: function() {},
img/xuanzhong@2x.png
pages/carDown/carDown.js
@@ -119,7 +119,8 @@
  pjxq:false,
  ipayShowPop:false,
  showIpay:false,
  orderType:2
  orderType:2,
  OrderInfo:{},
  },
  ipay(){
    this.setData({
@@ -194,6 +195,7 @@
        if(res.data.code==200){
          let money = "payStyle[" + 0 + "].money";
          let newmoney ="("+res.data.data.balance +'可用'+")"
          // let newmoney = res.data.data.balance
          this.setData({
           queryBalance:res.data.data,
           [money]:newmoney
@@ -283,6 +285,7 @@
      })
    },
    goPay1(){
      let that = this
      if(this.data.cancelOriginal=='无'){
        app.showToastSuccess('请选择支付方式',null,"none",1500)
      }else{
@@ -334,17 +337,16 @@
            },
            method:"POST",
            success:(res)=>{
              console.log(res)
              if(res.data.code==200){
                var  jsonData =JSON.parse(res.data.data)
                console.log(jsonData)
                var  jsonData =res.data.data
                console.log('wedakwpoakewpaokeqwokeo',jsonData)
                wx.requestPayment({
                  "timeStamp": jsonData.timestamp,
                  "nonceStr": jsonData.noncestr,
                  "timeStamp": jsonData.timeStamp,
                  "nonceStr": jsonData.nonceStr,
                  "package": jsonData.package,
                  "signType": jsonData.signType,
                  "paySign":jsonData.sign,
                  "success":function(res){
                  "success":(res)=>{
                    let that = this
                    that.setData({
                      showPayVan:false,
@@ -394,6 +396,9 @@
        method:"POST",
        success:(res)=>{
          console.log(res)
          this.setData({
            OrderInfo:res.data.data
          })
          if(res.data.code==200){
            if(res.data.data.device==2){
              this.setData({
pages/carDown/carDown.wxml
@@ -75,7 +75,7 @@
    <!--start-->
    <view class="start" hidden="{{!payEnd}}">
        <view class="car_monery" wx:if="{{money>0}}">¥{{money||0}}</view>
        <view class="please_pay" style="text-decoration:underline;padding-bottom:15rpx" catchtap="lookMoneyInfo">查看费用明细</view>
        <view class="please_pay" wx:if="{{OrderInfo.payManner==1}}" style="text-decoration:underline;padding-bottom:15rpx" catchtap="lookMoneyInfo">查看费用明细</view>
        <view class="noname" wx:if="{{nmpj}}">匿名评价司机</view>
        <view class="noname" wx:if="{{pjxq}}">评价详情</view>
        <!--遮罩层-->
@@ -101,12 +101,12 @@
            <image src="../../img/icon_close.png" catchtap="onClose"></image>
        </view>
        <view class="van_money car_monery">¥{{money||0}}</view>
        <view class="van_card" catchtap="getCou">
        <!-- <view class="van_card" catchtap="getCou">
            <view class="van_card_title">优惠券</view>
            <image src="../../img/icon_nav_open.png"></image>
            <view class="van_card_num" hidden="{{!showNumCoun}}">{{queryBalance.coupon==0?'0张可用券':'您有'+queryBalance.coupon+'张优惠券'}}</view>
            <view class="van_card_num" hidden="{{showNumCoun}}">{{moneyDown==""?'您有'+queryBalance.coupon+'张优惠券':'-'+moneyDown+'元'}}</view>
        </view>
        </view> -->
        <view class="select-item">
            <van-radio-group value="{{cancelOriginal}}" bind:change="onChange">
                <van-cell-group>
pages/carDown/carDown.wxss
@@ -260,7 +260,7 @@
.button_pay {
  width: 694rpx !important;
  height: 80rpx;
  background: rgba(74, 76, 89, 1);
  background: rgba(77, 139, 255, 1);
  border-radius: 8rpx;
  position: absolute;
  bottom: 28rpx;
@@ -277,7 +277,7 @@
.pay_button_btn{
  width: 629rpx !important;
  height: 80rpx;
  background: rgba(74, 76, 89, 1);
  background: rgba(77, 139, 255, 1);
  border-radius: 8rpx;
  margin:44rpx auto;
  font-size: 28rpx;
pages/changeCity/changeCity.js
@@ -2,6 +2,7 @@
const app = getApp();
const unit = require("../../utils/util")
const pinyins = require("../../utils/pinyin");
const BaiduMap = require('../../utils/bmap-wx.min')
// const pinYin =  require("../../utils/Convert_Pinyin")
Page({
  /**
@@ -33,71 +34,135 @@
    }
    console.log(arr)
    this.selectPinYin(arr);
    // console.log(arr);
  },
  //选择城市
  selectCity(e) {
    console.log(e)
    var pages = getCurrentPages();
    var prevPage = pages[pages.length - 2]; //上一个页面
    let self = e.currentTarget.dataset.self;
    // console.log(e);
    console.log(self)
    console.log('asfkpsaofdjkpqowpor', self)
    //设置地图markers
    if (this.data.where !== 'clickCity') {
      app.getQQMap().geocoder({
        //获取表单传入地址
        address: self, //地址参数,例:固定地址,address: '北京市海淀区彩和坊路海淀西大街74号'
        success: function (res) {
          console.log(res);
          //成功后的回调
          if (res.message == "Success") {
            var res = res.result;
            var latitude = res.location.lat;
            var longitude = res.location.lng; //根据地址解析在地图上标记解析地址位置
            // app.store.index.latitude = latitude;
            // app.store.index.longitude = longitude;
            wx.setStorageSync('latitude', latitude)
            wx.setStorageSync('longitude', longitude)
            wx.setStorageSync('cityName', res.address_components.city)
            prevPage.setData({
              cityName: res.address_components.city,
              latitude: latitude,
              longitude: longitude,
              showFrist: false,
              newCityName: self,
              formLocation: false
            })
            console.log(latitude, longitude)
            //调用home 方法
            prevPage.getLocal(latitude, longitude)
            prevPage.getadver(res.ad_info.adcode)
            prevPage.getadver2(res.ad_info.adcode)
            prevPage.openCity(res.ad_info.adcode)
            prevPage.setData({
              isLocation:true
            })
            wx.navigateBack({
              delta: 1
            });
          } else {
            wx.showToast({
              title: '服务器错误',
              icon: "none",
              duration: 1500
            })
          }
      //接入百度地图方法
      var bmap = new BaiduMap.BMapWX({
        ak: 'fi3HGJjW153NCNsaTb9FekxeX1Lj3auo' // 必填,您的key
      })
      console.log('shuju', bmap);
      bmap.geocoding({
        address: self,
        coordtype:'bd09ll',
        success: (res) => {
          bmap.regeocoding({
            coordtype:'bd09ll',
            location: `${res.result.location.lat},${res.result.location.lng}`, //获取到的位置信息
            success: (resp) => {
              var data = resp.originalData.result
              console.log('wdawda',resp);
              var latitude = data.location.lat;
              var longitude = data.location.lng; //根据地址解析在地图上标记解析地址位置
              wx.setStorageSync('latitude', latitude)
              wx.setStorageSync('longitude', longitude)
              wx.setStorageSync('cityName', data.addressComponent.city)
              prevPage.setData({
                cityName: data.addressComponent.city,
                latitude: latitude,
                longitude: longitude,
                showFrist: false,
                newCityName: self,
                formLocation: false
              })
              console.log(latitude, longitude)
              //调用home 方法
              prevPage.getLocal(latitude, longitude)
              prevPage.getadver(data.addressComponent.adcode)
              prevPage.getadver2(data.addressComponent.adcode)
              prevPage.openCity(data.addressComponent.adcode)
              prevPage.setData({
                isLocation: true
              })
              wx.navigateBack({
                delta: 1
              });
            },
            fail: (res) => {
              console.log('失败', res)
            }
          })
        }
      });
      })
      // app.getQQMap().geocoder({
      //   //获取表单传入地址
      //   address: self, //地址参数,例:固定地址,address: '北京市海淀区彩和坊路海淀西大街74号'
      //   success: function (res) {
      //     console.log(res);
      //     //成功后的回调
      //     if (res.message == "Success") {
      //       var res = res.result;
      //       var latitude = res.location.lat;
      //       var longitude = res.location.lng; //根据地址解析在地图上标记解析地址位置
      //       // app.store.index.latitude = latitude;
      //       // app.store.index.longitude = longitude;
      //       wx.setStorageSync('latitude', latitude)
      //       wx.setStorageSync('longitude', longitude)
      // wx.setStorageSync('cityName', res.address_components.city)
      // prevPage.setData({
      //   cityName: res.address_components.city,
      //   latitude: latitude,
      //   longitude: longitude,
      //   showFrist: false,
      //   newCityName: self,
      //   formLocation: false
      // })
      // console.log(latitude, longitude)
      // //调用home 方法
      // prevPage.getLocal(latitude, longitude)
      // prevPage.getadver(res.ad_info.adcode)
      // prevPage.getadver2(res.ad_info.adcode)
      // prevPage.openCity(res.ad_info.adcode)
      // prevPage.setData({
      //   isLocation:true
      // })
      // wx.navigateBack({
      //   delta: 1
      // });
      //     } else {
      //       wx.showToast({
      //         title: '服务器错误',
      //         icon: "none",
      //         duration: 1500
      //       })
      //     }
      //   }
      // });
    } else {
      prevPage.setData({
        cityName: self
      })
      prevPage.setData({
        isLocation:true
        isLocation: true
      })
      wx.navigateBack({
        delta: 1
pages/closeTip/closeTip.wxml
@@ -7,7 +7,7 @@
            <image src='../../img/back@3x.png' style=""></image>
        </view>
        <view class='nav-title'>
            <text style="height:{{navHeight}}px;line-height:{{navHeight}}px;font-size:26rpx;color:">支付费用</text>
            <text style="height:{{navHeight}}px;line-height:{{navHeight}}px;font-size:26rpx;">支付费用</text>
        </view>
    </view>
</view>
pages/getLocation/getLocation.js
@@ -2,6 +2,8 @@
var app = getApp()
const unit = require('../../utils/util')
const GdMap = require('../../utils/amap-wx')
const BaiduMap = require('../../utils/bmap-wx.min')
Page({
@@ -107,19 +109,19 @@
    this.setData({
      historyAddressListStart: []
    })
    var myAmapFun = new GdMap.AMapWX({
      key: 'a825dd33982ba213f2be3e83ad2f9a9b'
    });
    myAmapFun.getInputtips({
      keywords: inputValue,
      city: this.data.cityName,
      get_subpois: 1,
    var bmap = new BaiduMap.BMapWX({
      ak: 'fi3HGJjW153NCNsaTb9FekxeX1Lj3auo' // 必填,您的key
    })
    bmap.suggestion({
      query: inputValue,
      region:this.data.adcode,
      coordtype:'bd09ll',
      citylimit: true,
      success: (res) => {
        console.log(res)
        if (res.tips.length > 0) {
        if (res.result.length > 0) {
          this.setData({
            addressList: res.tips,
            addressList: res.result,
            noThing: false
          })
        } else {
@@ -167,8 +169,8 @@
    console.log(self)
    let pages = getCurrentPages();
    let prevPage = pages[pages.length - 2];
    let lat = self.location.split(",")[1]
    let lng = self.location.split(",")[0]
    let lat = self.location.lat
    let lng = self.location.lng
    let data = this.data
    prevPage.setData({
      startLat: lat,
@@ -329,8 +331,8 @@
    }
    let pages = getCurrentPages();
    let prevPage = pages[pages.length - 2];
    let lat = self.location.split(",")[1]
    let lng = self.location.split(",")[0]
    let lat = self.location.lat
    let lng = self.location.lng
    prevPage.setData({
      startLat: lat,
      startLon: lng,
pages/getLocation/getLocation.wxml
@@ -14,7 +14,7 @@
    <!--接入历史的数据-->
    <view class="history_box">
        <view hidden="{{noThing}}">
            <view class="history_search" wx:for="{{addressList}}" wx:if="{{!item.location.length==0}}" data-self="{{item}}" catchtap="updatePlace"
            <view class="history_search" wx:for="{{addressList}}" wx:if="{{item.location.lat}}" data-self="{{item}}" catchtap="updatePlace"
            style="{{modeSelectId == 2 ? 'height:160rpx' : 'height:120rpx'}}"
            >
                <view class="img_icon">
@@ -26,7 +26,7 @@
                    <view class="history_text_address {{modeSelectId == 2 ? 'font44' : ''}}">{{item.address||'无'}}</view>
                </view>
            </view>
            <view class="history_search" wx:if="{{addressList.length==0}}" wx:if="{{!item.location.length==0}}" wx:for="{{historyAddressListStart}}" data-self="{{item}}" catchtap="historyUpdatePlace" data-index="{{index}}" style="{{modeSelectId == 2 ? 'height:160rpx' : 'height:120rpx'}}">
            <view class="history_search" wx:if="{{addressList.length==0}}" wx:if="{{item.location.lat}}" wx:for="{{historyAddressListStart}}" data-self="{{item}}" catchtap="historyUpdatePlace" data-index="{{index}}" style="{{modeSelectId == 2 ? 'height:160rpx' : 'height:120rpx'}}">
                <view class="img_icon">
                    <image src="../../img/icon_history.png" class="history_icon"></image>
                </view>
pages/home/home.js
@@ -7,10 +7,7 @@
var touchMoveY = 0; // y轴方向移动的距离
const app = getApp()
const unit = require('../../utils/util')
const QQMapWX = require('../../utils/qqmap-wx-jssdk')
const GdMap = require('../../utils/amap-wx')
var WxParse = require("../../utils/wxParse/wxParse")
var qqmapsdk;
const BaiduMap = require('../../utils/bmap-wx.min')
var latitude = app.globalData.userLatitude
var longitude = app.globalData.userLongitude
const {
@@ -79,6 +76,8 @@
    isDj: 1,
    tip: '0元',
    changePeople: "选乘车人",
    changeModel:'线上计费',
    payModel:'线上计费',
    yyTime: '现在',
    btnDisabled: false, //呼叫车按钮,
    multiArray: [
@@ -172,7 +171,53 @@
    sameUserInfoObj: {}, //小件物流个人信息
    // 协议痰喘显示隐藏
    agreementShow: wx.getStorageSync('token') ? false : !wx.getStorageSync('isAgreement') && true,
    showModel:false,
  },
  //选择计费方式
  changeModel(){
    this.setData({
      showModel:true
    })
  },
  //关闭弹窗
  onClose(){
    this.setData({
      showModel:false
    })
  },
  //切换计费方式
  changeTab1(){
    this.setData({
      changeModel:'线上计费'
    })
  },
   //切换计费方式
   changeTab2(){
    console.log(2222222222);
    this.setData({
      changeModel:'打表计费'
    })
  },
  changePayModel(){
    this.setData({
      payModel:this.data.changeModel,
      showModel:false,
    })
  },
  // 同意协议
  agree() {
    wx.setStorageSync('isAgreement', 1)
@@ -215,19 +260,19 @@
    })
  },
  callPhone() {
    this.getIsBlack().then(res=>{
    this.getIsBlack().then(res => {
      if (res) {
        const phone = this.data.homePhone.filter(item => item.type == 3 && item.platform == 1)
      if (phone.length) {
        wx.makePhoneCall({
          phoneNumber: phone[0].phone //仅为示例,并非真实的电话号码
        })
      } else {
        wx.showToast({
          title: '助老模式暂未配置电话号码',
          icon: 'none'
        })
      }
        if (phone.length) {
          wx.makePhoneCall({
            phoneNumber: phone[0].phone //仅为示例,并非真实的电话号码
          })
        } else {
          wx.showToast({
            title: '助老模式暂未配置电话号码',
            icon: 'none'
          })
        }
      }
    })
  },
@@ -404,17 +449,28 @@
      this.mapCtx = wx.createMapContext("someCityMap");
      //获取中心坐标 api
      this.mapCtx.getCenterLocation({
        type: 'gcj02',
        // type: 'bd09ll',
        success: function (res) {
          that.setData({
            latitude: res.latitude,
            longitude: res.longitude,
            latitude: this.transformFromGCJToBaidu(res.latitude,res.longitude).latitude,
            longitude: this.transformFromGCJToBaidu(res.latitude,res.longitude).longitude,
          })
          that.getLocal(res.latitude, res.longitude)
          that.getCarNum(res.latitude, res.longitude, that.data.busId)
        }
      })
    }
  },
  transformFromGCJToBaidu(latitude, longitude) {
    var pi = 3.14159265358979324 * 3000.0 / 180.0;
    var z = Math.sqrt(longitude * longitude + latitude * latitude) + 0.00002 * Math.sin(latitude * pi);
    var theta = Math.atan2(latitude, longitude) + 0.000003 * Math.cos(longitude * pi);
    var a_latitude = (z * Math.sin(theta) + 0.006);
    var a_longitude = (z * Math.cos(theta) + 0.0065);
    return { latitude: a_latitude, longitude: a_longitude };
  },
  //queryLogisticsNumber 获取首页小件物流订单数量
  async queryLogisticsNumber() {
@@ -731,7 +787,10 @@
    let mapCtx = wx.createMapContext('map4select');
    mapCtx.moveToLocation({
      success: (res) => {
        console.log('adsadsad',res);
        this.getLocal(wx.getStorageSync('userLocation').split(",")[1], wx.getStorageSync('userLocation').split(",")[0])
    // this.getLocal(wx.getStorageSync('latitude'), wx.getStorageSync('longitude'))
        this.setData({
          newCityName: "",
          cityName: wx.getStorageSync('cityName')
@@ -915,6 +974,7 @@
      endLat: '',
      endLon: '',
    })
    // this.getLocal(wx.getStorageSync('latitude'), wx.getStorageSync('longitude'))
    this.getLocal(wx.getStorageSync('userLocation').split(",")[1], wx.getStorageSync('userLocation').split(",")[0])
  },
  // 获取隐私协议和用户协议
@@ -944,6 +1004,9 @@
    //swiper
    //  app.getFloatStr(5)
    // this.show()
    this.getAgreement()
    this.getSwiper()
    this.getHomePhone()
@@ -975,7 +1038,6 @@
  // 获取是否进入黑名单
  async getIsBlack() {
    let res = await unit.post(app.globalData.Url + '/api/checkBlack')
    console.log(res, '11111111111111111');
    if (res.data.code == -1) {
      //已经进入黑名单
      this.setData({
@@ -1019,11 +1081,13 @@
                        icon: 'success',
                        duration: 1000
                      })
                      //接入高地地图调用.....
                      var myAmapFun = new GdMap.AMapWX({
                        key: 'a825dd33982ba213f2be3e83ad2f9a9b'
                      });
                      myAmapFun.getRegeo({
                      //接入百度地图方法
                      var bmap = new BaiduMap.BMapWX({
                        ak: 'fi3HGJjW153NCNsaTb9FekxeX1Lj3auo' // 必填,您的key
                      })
                      bmap.regeocoding({
                        coordtype:'bd09ll',
                        success: (res) => {
                          // that.setData({
                          //   cityName:res[0].regeocodeData.addressComponent.city,
@@ -1034,18 +1098,18 @@
                          //   district:res[0].regeocodeData.addressComponent.province,
                          //   formatted_address:res[0].regeocodeData.formatted_address
                          // })
                          wx.setStorageSync('latitude', res[0].latitude)
                          wx.setStorageSync('longitude', res[0].longitude)
                          wx.setStorageSync('adcode', res[0].regeocodeData.addressComponent.adcode)
                          wx.setStorageSync('cityName', res[0].regeocodeData.addressComponent.city)
                          wx.setStorageSync('cityNameStart', res[0].name)
                          wx.setStorageSync('district', res[0].regeocodeData.addressComponent.district)
                          wx.setStorageSync('province', res[0].regeocodeData.addressComponent.province)
                          wx.setStorageSync('formatted_address', res[0].regeocodeData.formatted_address)
                          that.queryBusiness(res[0].regeocodeData.addressComponent.city, res[0].regeocodeData.addressComponent.district, res[0].regeocodeData.addressComponent.province)
                          that.getCarNum(res[0].latitude, res[0].longitude, that.data.busId)
                          that.openCity(res[0].regeocodeData.addressComponent.adcode)
                          that.getadver2(wx.getStorageSync('adcode') || res[0].regeocodeData.addressComponent.adcode)
                          wx.setStorageSync('latitude', res.originalData.result.location.lat)
                          wx.setStorageSync('longitude', res.originalData.result.location.lng)
                          wx.setStorageSync('adcode', res.originalData.result.addressComponent.adcode)
                          wx.setStorageSync('cityName', res.originalData.result.addressComponent.city)
                          wx.setStorageSync('cityNameStart', res.originalData.result.formatted_address)
                          wx.setStorageSync('district', res.originalData.result.addressComponent.district)
                          wx.setStorageSync('province', res.originalData.result.addressComponent.province)
                          wx.setStorageSync('formatted_address', res.originalData.result.formatted_address)
                          that.queryBusiness(res.originalData.result.addressComponent.city, res.originalData.result.addressComponent.district, res.originalData.result.addressComponent.province)
                          that.getCarNum(res.originalData.result.location.lat, res.originalData.result.location.lng, that.data.busId)
                          that.openCity(res.originalData.result.addressComponent.adcode)
                          that.getadver2(wx.getStorageSync('adcode') || res.originalData.result.addressComponent.adcode)
                        }
                      })
                    }
@@ -1093,34 +1157,36 @@
                    cancelColor: res,
                  })
                  if (res.confirm) {
                    var myAmapFun = new GdMap.AMapWX({
                      key: 'a825dd33982ba213f2be3e83ad2f9a9b'
                    });
                    myAmapFun.getRegeo({
                    var bmap = new BaiduMap.BMapWX({
                      ak: 'fi3HGJjW153NCNsaTb9FekxeX1Lj3auo' // 必填,您的key
                    })
                    bmap.regeocoding({
                      coordtype:'bd09ll',
                      success: (res) => {
                        that.setData({
                          cityName: res[0].regeocodeData.addressComponent.city,
                          latitude: res[0].latitude,
                          longitude: res[0].longitude,
                          adcode: res[0].regeocodeData.addressComponent.adcode,
                          cityNameStart: res[0].name,
                          district: res[0].regeocodeData.addressComponent.district,
                          province: res[0].regeocodeData.addressComponent.province,
                          formatted_address: res[0].regeocodeData.formatted_address
                          cityName: res.originalData.result.addressComponent.city,
                          latitude: res.originalData.result.location.lat,
                          longitude: res.originalData.result.location.lng,
                          adcode: res.originalData.result.addressComponent.adcode,
                          cityNameStart: res.originalData.result.formatted_address,
                          district: res.originalData.result.addressComponent.district,
                          province: res.originalData.result.addressComponent.province,
                          formatted_address: res.originalData.result.formatted_address
                        })
                        //获取城市
                        wx.setStorageSync('latitude', res[0].latitude)
                        wx.setStorageSync('longitude', res[0].longitude)
                        wx.setStorageSync('adcode', res[0].regeocodeData.addressComponent.adcode)
                        wx.setStorageSync('cityName', res[0].regeocodeData.addressComponent.city)
                        wx.setStorageSync('cityNameStart', res[0].name)
                        wx.setStorageSync('district', res[0].regeocodeData.addressComponent.district)
                        wx.setStorageSync('province', res[0].regeocodeData.addressComponent.province)
                        wx.setStorageSync('formatted_address', res[0].regeocodeData.formatted_address)
                        that.queryBusiness(res[0].regeocodeData.addressComponent.city, res[0].regeocodeData.addressComponent.district, res[0].regeocodeData.addressComponent.province)
                        that.getCarNum(res[0].latitude, res[0].longitude, that.data.busId)
                        that.openCity(res[0].regeocodeData.addressComponent.adcode)
                        that.getadver2(wx.getStorageSync('adcode') || that.data.adcode)
                        wx.setStorageSync('latitude', res.originalData.result.location.lat)
                        wx.setStorageSync('longitude', res.originalData.result.location.lng)
                        wx.setStorageSync('adcode', res.originalData.result.addressComponent.adcode)
                        wx.setStorageSync('cityName', res.originalData.result.addressComponent.city)
                        wx.setStorageSync('cityNameStart', res.originalData.result.formatted_address)
                        wx.setStorageSync('district', res.originalData.result.addressComponent.district)
                        wx.setStorageSync('province', res.originalData.result.addressComponent.province)
                        wx.setStorageSync('formatted_address', res.originalData.result.formatted_address)
                        that.queryBusiness(res.originalData.result.addressComponent.city, res.originalData.result.addressComponent.district, res.originalData.result.addressComponent.province)
                        that.getCarNum(res.originalData.result.location.lat, res.originalData.result.location.lng, that.data.busId)
                        that.openCity(res.originalData.result.addressComponent.adcode)
                        that.getadver2(wx.getStorageSync('adcode') || res.originalData.result.addressComponent.adcode)
                      }
                    })
                  } else {
@@ -1148,33 +1214,36 @@
                            duration: 1000
                          })
                          //接入高地地图调用.....
                          var myAmapFun = new GdMap.AMapWX({
                            key: 'a825dd33982ba213f2be3e83ad2f9a9b'
                          });
                          myAmapFun.getRegeo({
                          var bmap = new BaiduMap.BMapWX({
                            ak: 'fi3HGJjW153NCNsaTb9FekxeX1Lj3auo' // 必填,您的key
                          })
                          bmap.regeocoding({
                            coordtype:'bd09ll',
                            success: (res) => {
                              that.setData({
                                cityName: res[0].regeocodeData.addressComponent.city,
                                latitude: res[0].latitude,
                                longitude: res[0].longitude,
                                adcode: res[0].regeocodeData.addressComponent.adcode,
                                cityNameStart: res[0].name,
                                district: res[0].regeocodeData.addressComponent.district,
                                province: res[0].regeocodeData.addressComponent.province,
                                formatted_address: res[0].regeocodeData.formatted_address
                                cityName: res.originalData.result.addressComponent.city,
                                latitude: res.originalData.result.location.lat,
                                longitude: res.originalData.result.location.lng,
                                adcode: res.originalData.result.addressComponent.adcode,
                                cityNameStart: res.originalData.result.formatted_address,
                                district: res.originalData.result.addressComponent.district,
                                province: res.originalData.result.addressComponent.province,
                                formatted_address: res.originalData.result.formatted_address
                              })
                              wx.setStorageSync('latitude', res[0].latitude)
                              wx.setStorageSync('longitude', res[0].longitude)
                              wx.setStorageSync('adcode', res[0].regeocodeData.addressComponent.adcode)
                              wx.setStorageSync('cityName', res[0].regeocodeData.addressComponent.city)
                              wx.setStorageSync('cityNameStart', res[0].name)
                              wx.setStorageSync('district', res[0].regeocodeData.addressComponent.district)
                              wx.setStorageSync('province', res[0].regeocodeData.addressComponent.province)
                              wx.setStorageSync('formatted_address', res[0].regeocodeData.formatted_address)
                              that.queryBusiness(res[0].regeocodeData.addressComponent.city, res[0].regeocodeData.addressComponent.district, res[0].regeocodeData.addressComponent.province)
                              that.getCarNum(res[0].latitude, res[0].longitude, that.data.busId)
                              that.openCity(res[0].regeocodeData.addressComponent.adcode)
                              that.getadver2(wx.getStorageSync('adcode') || that.data.adcode)
                              //获取城市
                              wx.setStorageSync('latitude', res.originalData.result.location.lat)
                              wx.setStorageSync('longitude', res.originalData.result.location.lng)
                              wx.setStorageSync('adcode', res.originalData.result.addressComponent.adcode)
                              wx.setStorageSync('cityName', res.originalData.result.addressComponent.city)
                              wx.setStorageSync('cityNameStart', res.originalData.result.formatted_address)
                              wx.setStorageSync('district', res.originalData.result.addressComponent.district)
                              wx.setStorageSync('province', res.originalData.result.addressComponent.province)
                              wx.setStorageSync('formatted_address', res.originalData.result.formatted_address)
                              that.queryBusiness(res.originalData.result.addressComponent.city, res.originalData.result.addressComponent.district, res.originalData.result.addressComponent.province)
                              that.getCarNum(res.originalData.result.location.lat, res.originalData.result.location.lng, that.data.busId)
                              that.openCity(res.originalData.result.addressComponent.adcode)
                              that.getadver2(wx.getStorageSync('adcode') || res.originalData.result.addressComponent.adcode)
                            }
                          })
                        }
@@ -1186,34 +1255,36 @@
                }
              });
            } else if (res.authSetting['scope.userLocation'] == true) {
              var myAmapFun = new GdMap.AMapWX({
                key: 'a825dd33982ba213f2be3e83ad2f9a9b'
              });
              myAmapFun.getRegeo({
              var bmap = new BaiduMap.BMapWX({
                ak: 'fi3HGJjW153NCNsaTb9FekxeX1Lj3auo' // 必填,您的key
              })
              bmap.regeocoding({
                coordtype:'bd09ll',
                success: (res) => {
                  console.log('---------------------------------------------', res);
                  that.setData({
                    cityName: res[0].regeocodeData.addressComponent.city,
                    latitude: res[0].latitude,
                    longitude: res[0].longitude,
                    adcode: res[0].regeocodeData.addressComponent.adcode,
                    cityNameStart: res[0].name,
                    district: res[0].regeocodeData.addressComponent.district,
                    province: res[0].regeocodeData.addressComponent.province,
                    formatted_address: res[0].regeocodeData.formatted_address
                    cityName: res.originalData.result.addressComponent.city,
                    latitude: res.originalData.result.location.lat,
                    longitude: res.originalData.result.location.lng,
                    adcode: res.originalData.result.addressComponent.adcode,
                    cityNameStart: res.originalData.result.formatted_address,
                    district: res.originalData.result.addressComponent.district,
                    province: res.originalData.result.addressComponent.province,
                    formatted_address: res.originalData.result.formatted_address
                  })
                  wx.setStorageSync('latitude', res[0].latitude)
                  wx.setStorageSync('longitude', res[0].longitude)
                  wx.setStorageSync('adcode', res[0].regeocodeData.addressComponent.adcode)
                  wx.setStorageSync('cityName', res[0].regeocodeData.addressComponent.city)
                  wx.setStorageSync('cityNameStart', res[0].name)
                  wx.setStorageSync('district', res[0].regeocodeData.addressComponent.district)
                  wx.setStorageSync('province', res[0].regeocodeData.addressComponent.province)
                  wx.setStorageSync('formatted_address', res[0].regeocodeData.formatted_address)
                  that.queryBusiness(res[0].regeocodeData.addressComponent.city, res[0].regeocodeData.addressComponent.district, res[0].regeocodeData.addressComponent.province)
                  that.getCarNum(res[0].latitude, res[0].longitude, that.data.busId)
                  that.openCity(res[0].regeocodeData.addressComponent.adcode)
                  that.getadver2(wx.getStorageSync('adcode') || that.data.adcode)
                  wx.setStorageSync('latitude', res.originalData.result.location.lat)
                  wx.setStorageSync('longitude', res.originalData.result.location.lng)
                  wx.setStorageSync('adcode', res.originalData.result.addressComponent.adcode)
                  wx.setStorageSync('cityName', res.originalData.result.addressComponent.city)
                  wx.setStorageSync('cityNameStart', res.originalData.result.formatted_address)
                  wx.setStorageSync('district', res.originalData.result.addressComponent.district)
                  wx.setStorageSync('province', res.originalData.result.addressComponent.province)
                  wx.setStorageSync('formatted_address', res.originalData.result.formatted_address)
                  that.queryBusiness(res.originalData.result.addressComponent.city, res.originalData.result.addressComponent.district, res.originalData.result.addressComponent.province)
                  that.getCarNum(res.originalData.result.location.lat, res.originalData.result.location.lng, that.data.busId)
                  that.openCity(res.originalData.result.addressComponent.adcode)
                  that.getadver2(wx.getStorageSync('adcode') || res.originalData.result.addressComponent.adcode)
                },
                fail(err) {
                  console.log(err)
@@ -1311,6 +1382,7 @@
      btnDisabled: true
    })
    var DATE = unit.formatTimeUser(new Date());
    if (this.data.checkDown == 2) {
      if (this.data.yyTime == "现在") {
        this.setData({
@@ -1369,11 +1441,15 @@
      startAddress: this.data.changeStartName || this.data.cityNameStart,
      startLat: startLat,
      startLon: startLon,
      areaCode:wx.getStorageSync('adcode'),
      substitute: this.data.substitute, //代下单
      tipMoney: +this.data.tip.substr(0, this.data.tip.length - 1),
      travelTime: this.data.date
      travelTime: this.data.date,
      payManner:this.data.payModel=='线上计费'?1:2
    }
    if (Object.keys(btnCarData).length == 15) {
    console.log('wdawdad',btnCarData);
    if (Object.keys(btnCarData).length == 17) {
      btnCarData.oldPeople = Number(!mode)
      if (Number(!mode)) {
        btnCarData.endAddress = ''
@@ -1385,6 +1461,7 @@
          nextLongitude: '',
        })
      }
      unit.post(app.globalData.Url + '/api/taxi/taxiOrder',
          btnCarData,
@@ -1773,7 +1850,7 @@
  },
  closeBlack() {
    this.setData({
      showBlack:false
      showBlack: false
    })
  },
@@ -1879,33 +1956,31 @@
  },
  // 获取当前地理位置
  getLocal: function (latitude, longitude) {
    qqmapsdk = new QQMapWX({
      key: 'SVIBZ-4RN6J-LPRF2-XZOZF-EAZKF-USFTD' //这里自己的key秘钥进行填充
    });
    var bmap = new BaiduMap.BMapWX({
      ak: 'fi3HGJjW153NCNsaTb9FekxeX1Lj3auo' // 必填,您的key
    })
    let that = this;
    qqmapsdk.reverseGeocoder({
      location: {
        latitude: latitude,
        longitude: longitude
      },
    bmap.regeocoding({
      coordtype:'bd09ll',
      location: latitude + ',' + longitude,
      success: function (res) {
        console.log(res)
        console.log('454545d4454545451', res)
        //这里的res参数里有具体的城市数据
        var name = res.result.address_component
        var name = res.originalData.result.addressComponent
        that.setData({
          changeStartName: '',
          startLat:'',
          startLon:'',
          cityNameStart: res.result.address_reference.landmark_l2.title,
          adcode: res.result.ad_info.adcode,
          latitude: res.result.location.lat,
          longitude: res.result.location.lng
          startLat: '',
          startLon: '',
          cityNameStart: res.originalData.result.formatted_address,
          adcode: res.originalData.result.addressComponent.adcode,
          latitude: res.originalData.result.location.lat,
          longitude: res.originalData.result.location.lng
        })
        that.queryBusiness(name.city, name.district, name.province)
        that.openCity(res.result.ad_info.adcode)
        that.openCity(res.originalData.result.addressComponent.adcode)
      },
      fail: function (res) {
        console.log('////////////',res);
        that.setData({
          cityNameStart: "正在定位中"
        })
@@ -1940,45 +2015,79 @@
      ]
      let startLat = that.data.startLat || that.data.latitude
      let startLon = that.data.startLon || that.data.longitude
      unit.get('https://apis.map.qq.com/ws/direction/v1/driving/?from=' +
          startLat + ',' +
          startLon + '&to=' + that.data.nextLatitude + ',' +
          that.data.nextLongitude + '&output=json&callback=cb&key=SVIBZ-4RN6J-LPRF2-XZOZF-EAZKF-USFTD', {})
        .then((res) => {
      // unit.get('https://apis.map.qq.com/ws/direction/v1/driving/?from=' +
      //     startLat + ',' +
      //     startLon + '&to=' + that.data.nextLatitude + ',' +
      //     that.data.nextLongitude + '&output=json&callback=cb&key=SVIBZ-4RN6J-LPRF2-XZOZF-EAZKF-USFTD', {})
      //   .then((res) => {
      //     if (res.data.message == 'Success') {
      //       var coors = res.data.result.routes[0].polyline
      //       for (var i = 2; i < coors.length; i++) {
      //         coors[i] = coors[i - 2] + coors[i] / 1000000
      //       }
      //       // coors.forEach((element,index) => {
      //       //   coors[index] =coors[index - 2]+ coors[index]/ 1000000
      //       // });
      //       //划线
      //       var b = [];
      //       for (var i = 0; i < coors.length; i = i + 2) {
      //         b[i / 2] = {
      //           latitude: coors[i],
      //           longitude: coors[i + 1]
      //         };
      //       }
          if (res.data.message == 'Success') {
            var coors = res.data.result.routes[0].polyline
            for (var i = 2; i < coors.length; i++) {
              coors[i] = coors[i - 2] + coors[i] / 1000000
            }
            // coors.forEach((element,index) => {
            //   coors[index] =coors[index - 2]+ coors[index]/ 1000000
            // });
            //划线
            var b = [];
            for (var i = 0; i < coors.length; i = i + 2) {
              b[i / 2] = {
                latitude: coors[i],
                longitude: coors[i + 1]
              };
            }
      //       that.setData({
      //         polyline: [{
      //           points: b,
      //           arrowLine: true,
      //           color: '#00C47A',
      //           width: 4,
      //           borderWidth: 1,
      //           borderColor: '#00C47A'
      //         }],
      //       })
      //     } else {
      //       app.showToastSuccess('路线规划失败', null, "none", 1500)
      //     }
      //   })
      wx.request({
        url: `https://api.map.baidu.com/directionlite/v1/driving?origin=${startLat},${startLon}&destination=${ that.data.nextLatitude},${that.data.nextLongitude}&ak=WQhfsluNzEeUHUxoH4jc4JiCQOXw4Mnx&coordtype=bd09ll,`,
        success: function (res) {
          console.log('weewqeqwe', res);
          if (res.data.status == 0) {
            var coors = res.data.result.routes[0].steps
            var polyline = [];
            coors.forEach(function (step) {
                polyline.push({
                  latitude: step.end_location.lat,
                  longitude: step.end_location.lng
                });
            });
            that.setData({
              polyline: [{
                points: b,
                points: polyline,
                arrowLine: true,
                color: '#00C47A',
                width: 4,
                borderWidth: 1,
                borderColor: '#00C47A'
              }],
            })
          } else {
            app.showToastSuccess('路线规划失败', null, "none", 1500)
            });
          }
        })
        },
        fail: function (res) {
          app.showToastSuccess('路线规划失败', null, "none", 1500)
        }
      })
      unit.post(app.globalData.Url + '/base/taxi/queryExpectedTime', {
          // slat:that.data.latitude,
          // slon:that.data.longitude,
@@ -1999,7 +2108,7 @@
            var markers = [{
                iconPath: "../../img/start_icon.png",
                id: "map4select",
                id: 1,
                latitude: that.data.startLat || that.data.latitude,
                longitude: that.data.startLon || that.data.longitude,
                width: 26,
@@ -2007,7 +2116,7 @@
              },
              {
                iconPath: "../../img/end_icon.png",
                id: "map4select",
                id: 2,
                latitude: that.data.nextLatitude,
                longitude: that.data.nextLongitude,
                width: 26,
pages/home/home.wxml
@@ -116,8 +116,9 @@
            </view>
            <!--选择乘车人-->
            <view class="use_people" catchtap="changePeople" hidden="{{checkDown!==3}}">
              {{changePeople}} >
              {{changePeople}} > 222222222222
            </view>
            <!--预约原则时间-->
            <view class="use_people" catchtap="selecttime" hidden="{{checkDown!==2}}">
              {{yyTime=='现在'?'选择时间':yyTime}} >
@@ -149,8 +150,9 @@
            </view>
            <!--选择乘车人-->
            <view class="use_people" catchtap="changePeople" hidden="{{checkDown!==3}}">
              {{changePeople}} >
              {{changePeople}} > 1111111
            </view>
            <!--预约原则时间-->
            <view class="use_people" catchtap="selecttime" hidden="{{checkDown!==2}}">
              {{yyTime=='现在'?'选择时间':yyTime}} >
@@ -202,8 +204,13 @@
          <!--乘车人和消费-->
          <view class="car_change" hidden="{{checkDown==2}}">
            <view wx:if="{{busId==2}}" style="display: flex;align-items: center;justify-content: center;width: 100%;">
              <view class="people_selsect" catchtap="changePeople">
              <view class="people_selsect bor-R" catchtap="changePeople">
                {{changePeople}}
                <image src="../../img/icon_nav_open.png" class="jiantou"></image>
              </view>
              <view class="people_selsect" catchtap="changeModel">
                {{payModel}}
                <image src="../../img/icon_nav_open.png" class="jiantou"></image>
              </view>
            </view>
@@ -222,13 +229,18 @@
            <view wx:if="{{busId==1}}" class="people_selsect" catchtap="setSosPeople">紧急联系人<image src="../../img/icon_nav_open.png" class="jiantou"></image>
            </view>
          </view>
          <view class="car_change" hidden="{{checkDown==1||checkDown==3}}">
            <view class="people_selsect {{checkDown==2?'three':''}}" catchtap="selecttime">
          <view class="car_change" style="display: flex;align-items: center;" hidden="{{checkDown==1||checkDown==3}}" wx:if="{{checkDown==2}}">
            <view class="people_selsect bor-R  {{checkDown==2?'three':''}}" catchtap="selecttime">
              {{yyTime=='现在'?'选择时间':yyTime}}
              <image src="../../img/icon_nav_open.png" class="jiantou"></image>
            </view>
            <view class="people_selsect {{checkDown==2?'three':''}}" catchtap="changePeople">
            <view class="people_selsect bor-R  {{checkDown==2?'three':''}}" catchtap="changePeople">
              {{changePeople}}
              <image src="../../img/icon_nav_open.png" class="jiantou"></image>
            </view>
            <view class="people_selsect {{checkDown==2?'three':''}}" catchtap="changeModel">
              {{payModel}}
              <image src="../../img/icon_nav_open.png" class="jiantou"></image>
            </view>
            <!-- <view class="people_selsect {{checkDown==2?'three':''}}" catchtap="selecttip">
@@ -475,4 +487,26 @@
    <view class="contact" catchtap="serverPhone">去联系</view>
    <image catchtap="closeBlack" class="close" src="/img/icon_close@2x.png"></image>
  </view>
</view>
</view>
<van-popup position="bottom" overlay="{{ true }}" show="{{showModel}}" bind:close="onClose">
  <view class="van_top">
    <view class="van_title" style="font-weight: 600;">选择计费方式</view>
    <image src="../../img/icon_close.png" catchtap="onClose"></image>
  </view>
  <view class="van-content">
    <view class="van-item" bindtap="changeTab1">
      <image src="../../img/xuanzhong@2x.png" wx:if="{{changeModel=='线上计费'}}" class="check-icon-item" />
      <image src="../../img/icon_raidobutton.png" wx:if="{{changeModel=='打表计费'}}" class="check-icon-item" />
      <text style="font-weight: 600;"> 线上计费</text> (平台计费在线付款给平台)
    </view>
    <view class="van-item" bindtap="changeTab2">
      <image src="../../img/icon_raidobutton.png" wx:if="{{changeModel=='线上计费'}}" class="check-icon-item" />
      <image src="../../img/xuanzhong@2x.png" wx:if="{{changeModel=='打表计费'}}" class="check-icon-item" />
     <text style="font-weight: 600;">打表计费</text> (司机打表计费)
    </view>
  </view>
  <button disabled="{{btnDisabled}}" catchtap="changePayModel" class="sure-btn">确认</button>
</van-popup>
pages/home/home.wxss
@@ -622,11 +622,12 @@
  text-align: center;
  width: 350rpx;
  height: 40rpx;
  margin-top: 24rpx;
  /* margin-top: 24rpx; */
  font-size: 24rpx;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  color: rgba(0, 0, 0, 1)
}
.three {
@@ -1458,10 +1459,55 @@
  margin: auto;
  margin-top: 50rpx;
}
.blackList .close {
  width: 32rpx;
  height: 32rpx;
  position: absolute;
  top: 40rpx;
  right: 32rpx;
}
.bor-R {
  border-right: 1rpx solid rgba(232, 232, 232, 1);
}
.van_title {
  font-family: PingFangSC, PingFang SC;
  font-weight: 500;
  font-size: 31rpx;
  color: rgba(0, 0, 0, .8);
  text-align: center;
  margin-top: 34.62rpx;
}
.check-icon-item {
  width: 34.62rpx;
  height: 34.62rpx;
  margin-right: 19.23rpx;
}
.van-item {
  margin-left: 26.92rpx;
  margin-right: 26.92rpx;
  display: flex;
  align-items: center;
  height: 90.38rpx;
  font-family: PingFangSC, PingFang SC;
  font-weight: 500;
  font-size: 23rpx;
  border-bottom: 1rpx solid rgba(151, 151, 151, .15);
}
.sure-btn {
  width: 515rpx !important;
  height: 77rpx;
  background: #4D8BFF;
  border-radius: 8rpx;
  margin-top: 65.38rpx;
  font-family: PingFangSC, PingFang SC;
  font-weight: 500;
  font-size: 29rpx;
  color: #FFFFFF;
}
pages/moneyInfo/moneyInfo.wxml
@@ -9,19 +9,19 @@
            <view class="money_messageinfo_title">起步价<span>({{dataMoney.startMileage}}) 公里</span></view>
            <view class="money_messageinfo_title"><span class="money_span">{{dataMoney.startMoney}}</span>元</view>
        </view>
        <view class="money_messageinfo" wx:if="{{orderType==1 &&dataMoney.waitMoney!=='0.00'}}">
        <view class="money_messageinfo" wx:if="{{dataMoney.waitMoney!=='0.00'}}">
            <view class="money_messageinfo_title">等待费<span>({{dataMoney.wait}}) 分钟</span></view>
            <view class="money_messageinfo_title"><span class="money_span">{{dataMoney.waitMoney}}</span>元</view>
        </view>
        <view class="money_messageinfo" wx:if="{{orderType==1&&dataMoney.durationMoney!=='0.00'}}">
        <view class="money_messageinfo" wx:if="{{dataMoney.durationMoney!=='0.00'}}">
            <view class="money_messageinfo_title">时长费<span>({{dataMoney.duration}}) 分钟</span></view>
            <view class="money_messageinfo_title"><span class="money_span">{{dataMoney.durationMoney}}</span>元</view>
        </view>
        <view class="money_messageinfo" wx:if="{{orderType==1&&dataMoney.mileageMoney!=='0.00'}}">
        <view class="money_messageinfo" wx:if="{{dataMoney.mileageMoney!=='0.00'}}">
            <view class="money_messageinfo_title">里程费<span>({{dataMoney.mileage}}) 公里</span></view>
            <view class="money_messageinfo_title"><span class="money_span">{{dataMoney.mileageMoney}}</span>元</view>
        </view>
        <view class="money_messageinfo" wx:if="{{orderType==1&&dataMoney.longDistanceMoney!=='0.00'}}">
        <view class="money_messageinfo" wx:if="{{dataMoney.longDistanceMoney!=='0.00'}}">
            <view class="money_messageinfo_title">远途费<span>({{dataMoney.longDistance}}) 公里</span></view>
            <view class="money_messageinfo_title"><span class="money_span">{{dataMoney.longDistanceMoney}}</span>元</view>
        </view>
pages/myTrip/okTrip/okTrip.js
@@ -12,11 +12,15 @@
    orderId: "",
    orderType: "",
    modeSelectId: wx.getStorageSync('modeId') || 1,
    OrderInfo:{},
  },
  lookMoneyInfo() {
    wx.navigateTo({
    if(this.data.OrderInfo.payManner==1){
         wx.navigateTo({
      url: '/pages/moneyInfo/moneyInfo?id=' + this.data.orderId + '&orderType=' + this.data.orderType,
    })
    }
  },
  /**
   * 生命周期函数--监听页面加载
@@ -94,7 +98,9 @@
        orderType: this.data.orderType
      })
      .then((res) => {
        console.log(res)
        this.setData({
          OrderInfo:res.data.data
        })
        if (res.data.code == 200) {
          var points = [{
            latitude: res.data.data.startLat,
pages/myTrip/okTrip/okTrip.wxml
@@ -11,10 +11,10 @@
                </view>
                <view class="okTrip_car_style">
                    {{orderMessage.brand}} · {{orderMessage.carColor}}
                    <!-- <view class="okTrip_money" catchtap="lookMoneyInfo">
                    <view class="okTrip_money" catchtap="lookMoneyInfo">
                        {{orderMoney}}元
                      <image src="/img/arrows@3x.png"></image>
                    </view> -->
                    </view>
                </view>
                <view class="okTrip_start">
                    <image src="../../../img/icon_score.png"></image>
pages/myTrip/wait-pj/wait-pj.js
@@ -109,11 +109,14 @@
      ischeck: false
    }],
    nmpj: true,
    OrderInfo:{},
  },
  lookMoneyInfo() {
    wx.navigateTo({
    if(this.data.OrderInfo.payManner==1){
         wx.navigateTo({
      url: '/pages/moneyInfo/moneyInfo?id=' + this.data.orderId + '&orderType=' + this.data.orderType,
    })
    }
  },
  //星星评价
  select(e) {
@@ -302,6 +305,9 @@
      })
      .then((res) => {
        console.log(res)
        this.setData({
          OrderInfo:res.data.data
        })
        if (res.data.code == 200) {
          var points = [{
            latitude: res.data.data.startLat,
pages/myTrip/wait-pj/wait-pj.wxml
@@ -11,10 +11,10 @@
                </view>
                <view class="okTrip_car_style">
                    {{orderMessage.brand}} · {{orderMessage.carColor}}
                    <!-- <view class="okTrip_money" catchtap="lookMoneyInfo">
                    <view class="okTrip_money" catchtap="lookMoneyInfo">
                        {{orderMoney}}元
                        <image src="/img/arrows@3x.png"></image>
                    </view> -->
                    </view>
                </view>
                <view class="okTrip_start">
                    <image src="../../../img/icon_score.png"></image>
pages/setLocation/setLocation.js
@@ -3,6 +3,8 @@
const unit = require('../../utils/util')
const GdMap = require('../../utils/amap-wx')
const BaiduMap = require('../../utils/bmap-wx.min')
Page({
  /**
@@ -12,6 +14,7 @@
   where:"",
   height:wx.getStorageSync('height'),
   cityName:''||wx.getStorageSync('cityName'),
   adcode:''||wx.getStorageSync('adcode'),
   showHistory:false,
   addressList:[]
  },
@@ -42,18 +45,33 @@
  },
  //根据未知名调取地图
  getLocation(inputValue){
    var myAmapFun = new GdMap.AMapWX({ key: 'a825dd33982ba213f2be3e83ad2f9a9b' });
    myAmapFun.getInputtips({
      keywords:inputValue,
      city:this.data.cityName,
      get_subpois:1,
    var bmap = new BaiduMap.BMapWX({
      ak: 'fi3HGJjW153NCNsaTb9FekxeX1Lj3auo' // 必填,您的key
    })
    bmap.suggestion({
      query: inputValue,
      region:this.data.adcode,
      coordtype:'bd09ll',
      success:(res)=>{
        console.log(res)
        this.setData({
          addressList : res.tips
          addressList : res.result
        })
      }
    })
    // var myAmapFun = new GdMap.AMapWX({ key: 'a825dd33982ba213f2be3e83ad2f9a9b' });
    // myAmapFun.getInputtips({
    //   keywords:inputValue,
    //   city:this.data.cityName,
    //   get_subpois:1,
    //   success:(res)=>{
    //     console.log('45454545',res)
    //     this.setData({
    //       addressList : res.tips
    //     })
    //   }
    // })
  },
  clearEnd(){
    wx.removeStorage({
@@ -64,11 +82,11 @@
    })
  },
  historyUpdatePlace(e){
       let  self =  e.currentTarget.dataset.self
       let self =  e.currentTarget.dataset.self
       let pages = getCurrentPages(); 
       let prevPage = pages[pages.length - 2];
       let lat = self.location.split(",")[1]
       let lng = self.location.split(",")[0]
       let lat = self.location.lat
       let lng = self.location.lng
       console.log(prevPage)
         prevPage.setData({
           nextLatitude:lat,
@@ -145,8 +163,8 @@
    }
    let pages = getCurrentPages(); 
    let prevPage = pages[pages.length - 2];
    let lat = self.location.split(",")[1]
    let lng = self.location.split(",")[0]
    let lat = self.location.lat
    let lng = self.location.lng
    console.log(prevPage)
      prevPage.setData({
        nextLatitude:lat,
pages/setLocation/setLocation.wxml
@@ -13,7 +13,7 @@
    </view>
    <!--接入历史的数据-->
    <view class="history_box">
        <view class="history_search" wx:for="{{addressList}}" wx:if="{{!item.location.length==0}}" data-self="{{item}}" catchtap="updatePlace" data-index="{{index}}">
        <view class="history_search" wx:for="{{addressList}}" wx:if="{{item.location.lat}}" data-self="{{item}}" catchtap="updatePlace" data-index="{{index}}">
            <view class="img_icon" >
                <image src="../../img/icon_history.png" class="history_icon"></image>
            </view>
@@ -23,7 +23,7 @@
                <view class="history_text_address">{{item.address||'无'}}</view>
            </view>
        </view>
        <view class="history_search" wx:if="{{addressList.length==0}}" wx:key="index" wx:if="{{!item.location.length==0}}" wx:for="{{historyAddressList}}" data-self="{{item}}" catchtap="historyUpdatePlace" data-index="{{index}}">
        <view class="history_search" wx:if="{{addressList.length==0}}" wx:key="index" wx:if="{{item.location.lat}}" wx:for="{{historyAddressList}}" data-self="{{item}}" catchtap="historyUpdatePlace" data-index="{{index}}">
    
                <view class="img_icon" >
                    <image src="../../img/icon_history.png" class="history_icon"></image>
pages/waiting/waiting.js
@@ -63,7 +63,8 @@
    couponId: '',
    isIncok: false,
    showIpay: false,
    payStyle: [{
    payStyle: [
      {
        name: "充值余额",
        checked: false,
        money: '0元'
@@ -180,6 +181,7 @@
    orderType: "", //车型类型
    remark: "",
    sendTitle: "等待应答", //title
    OrderInfo:{},
  },
  ipay() {
@@ -198,7 +200,7 @@
        orderType: this.data.orderType
      })
      .then((res) => {
        console.log(res)
        // console.log(res)
        if (res.data.code == 200) {
          this.setData({
            showPayVan: false,
@@ -270,7 +272,7 @@
  },
  closeOrder() {
    console.log(this.data.orderID, wx.getStorageSync('orderID'), this.data.orderType)
    // console.log(this.data.orderID, wx.getStorageSync('orderID'), this.data.orderType)
    wx.navigateTo({
      url: '../../pages/canceLorder/canceLorder?id=' + (this.data.orderID || wx.getStorageSync('orderID')) + '&type=' + this.data.orderType + '&state=' + this.data.state,
    })
@@ -297,7 +299,7 @@
      header: header,
      method: 'POST',
      success: (res) => {
        console.log(res)
        // console.log(res)
        if (res.data.code == 200) {
          let pages = getCurrentPages();
          let prevPage = pages[pages.length - 2];
@@ -329,7 +331,7 @@
    })
  },
  yesOrder() {
    console.log("111")
    // console.log("111")
    // app.closeSocket()
    this.setData({
      isShowOrder: false
@@ -346,7 +348,7 @@
  onLoad: function (options) {
    getDriveIng = setInterval(() => {
      this.getDriveIng()
    }, 1000)
    }, 3000)
    let isPhone = app.globalData.isIphoneX;
    if (options.where == "myTrip" || options.where == "drive") {
      wx.setStorageSync('orderID', options.orderID)
@@ -381,7 +383,7 @@
      })
      //订单状态-监听globalData
    } else {
      console.log('1')
      // console.log('1')
      if (options.orderType) {
        let orderType = options.orderType
        this.setData({
@@ -454,7 +456,7 @@
  },
  close_order() {
    console.log("11")
    // console.log("11")
    this.setData({
      isShowClose: true
    })
@@ -482,7 +484,7 @@
        orderType: this.data.orderType
      },
      success: (res) => {
        console.log(res,res.data.data.score.toFixed(1))
        // console.log(res,res.data.data.score.toFixed(1))
        if (res.data.code == 200) {
          this.setData({
            drive: res.data.data,
@@ -498,51 +500,84 @@
  //根据经纬度路线规划
  //获取行车路线
  getDriverLine(fromValue, toValue) {
    // console.log('shhuji',fromValue,toValue);
    let that = this;
    app.getQQMap().direction({
      mode: "driving", //可选值:'driving'(驾车)、'walking'(步行)、'bicycling'(骑行),不填默认:'driving',可不填
      //from参数不填默认当前地址
      from: fromValue,
      to: toValue, // toValue
    wx.request({
      url: `https://api.map.baidu.com/directionlite/v1/driving?origin=${fromValue.latitude},${fromValue.longitude}&destination=${toValue.latitude},${toValue.longitude}&ak=WQhfsluNzEeUHUxoH4jc4JiCQOXw4Mnx&coordtype=bd09ll`,
      success: function (res) {
        var ret = res;
        var coors = ret.result.routes[0].polyline,
          pl = [];
        //坐标解压(返回的点串坐标,通过前向差分进行压缩)
        var kr = 1000000;
        for (var i = 2; i < coors.length; i++) {
          coors[i] = Number(coors[i - 2]) + Number(coors[i]) / kr;
        }
        //将解压后的坐标放入点串数组pl中
        for (var i = 0; i < coors.length; i += 2) {
          pl.push({
            latitude: coors[i],
            longitude: coors[i + 1]
        if (res.data.status == 0) {
          var coors = res.data.result.routes[0].steps
          var polyline = [];
          coors.forEach(function (step) {
              polyline.push({
                latitude: step.end_location.lat,
                longitude: step.end_location.lng
              });
          });
          that.setData({
            latitude: polyline[0].latitude,
            longitude: polyline[0].longitude,
            line:true,
            polyline: [{
              points: polyline,
              arrowLine: true,
              color: '#00C47A',
              width: 4,
              borderWidth: 1,
              borderColor: '#00C47A'
            }],
          });
        }
        //设置polyline属性,将路线显示出来,将解压坐标第一个数据作为起点
        that.setData({
          // latitude: pl[0].latitude,
          // longitude: pl[0].longitude,
          line: true,
          polyline: [{
            points: pl,
            arrowLine: true,
            color: '#00C47A',
            width: 4,
            borderWidth: 1,
            borderColor: '#00C47A'
          }, ],
        });
        return
      },
      fail: function (error) {
        console.error(error);
      },
      complete: function (res) {
        console.log(res);
      },
    });
      fail: function (res) {
        app.showToastSuccess('路线规划失败', null, "none", 1500)
      }
    })
    // app.getQQMap().direction({
    //   mode: "driving", //可选值:'driving'(驾车)、'walking'(步行)、'bicycling'(骑行),不填默认:'driving',可不填
    //   //from参数不填默认当前地址
    //   from: fromValue,
    //   to: toValue, // toValue
    //   success: function (res) {
    //     var ret = res;
    //     var coors = ret.result.routes[0].polyline,
    //       pl = [];
    //     //坐标解压(返回的点串坐标,通过前向差分进行压缩)
    //     var kr = 1000000;
    //     for (var i = 2; i < coors.length; i++) {
    //       coors[i] = Number(coors[i - 2]) + Number(coors[i]) / kr;
    //     }
    //     //将解压后的坐标放入点串数组pl中
    //     for (var i = 0; i < coors.length; i += 2) {
    //       pl.push({
    //         latitude: coors[i],
    //         longitude: coors[i + 1]
    //       });
    //     }
    //     //设置polyline属性,将路线显示出来,将解压坐标第一个数据作为起点
    //     that.setData({
    //       // latitude: pl[0].latitude,
    //       // longitude: pl[0].longitude,
    //       line: true,
    //       polyline: [{
    //         points: pl,
    //         arrowLine: true,
    //         color: '#00C47A',
    //         width: 4,
    //         borderWidth: 1,
    //         borderColor: '#00C47A'
    //       }, ],
    //     });
    //     return
    //   },
    //   fail: function (error) {
    //     console.error(error);
    //   },
    //   complete: function (res) {
    //     console.log(res);
    //   },
    // });
  },
  //封装函数
  formatTime(num) {
@@ -554,14 +589,14 @@
    return `${m}:${s}`;
  },
  getMylocation() {
    console.log("1")
    // console.log("1")
    let mapCtx = wx.createMapContext('map4select');
    mapCtx.moveToLocation({
      success: (res) => {
        console.log(res)
        // console.log(res)
      },
      fail: (res) => {
        console.log(res)
        // console.log(res)
      }
    });
@@ -586,24 +621,25 @@
      header: header,
      method: "POST",
      success: (res) => {
        console.log(res)
        // console.log(res)
      }
    })
  },
  //webSocket 函数
  waitTingApi(type) {
    console.log('---------------111')
    // console.log('---------------111')
    let resData = JSON.parse(type);
    console.log("订单", resData.data);
    console.log("订单状态", resData.method);
    // console.log("订单状态", resData.method);
    if (resData.method == 'ORDER_CANCEL') {
      wx.navigateBack()
      return
    }
    let {
      orderID
    } = this.data
    console.log(orderID,'111111')
    // console.log(orderID,'111111')
    this.setData({
      servedMileage: resData.data.servedMileage || 0, //订单为服务中的服务距离
      laveTime: resData.data.laveTime || 0, //订单为服务中的预计剩余时间
@@ -691,7 +727,7 @@
        wx.setStorageSync('SERVER_TIME', nowTime)
        let time = wx.getStorageSync('SERVER_TIME')
        console.log(time, '++++++++++++++++++')
        // console.log(time, '++++++++++++++++++')
        this.setTimerTime = setInterval(() => {
          this.setData({
            waitTimeTime: this.formatTime(new Date(time).getTime()),
@@ -744,7 +780,7 @@
          sendTitle: "支付费用"
        })
      } else if (state == 7) {
        console.log("1")
        // console.log("1")
        this.setData({
          showMap: false,
          showPay: true,
@@ -770,7 +806,7 @@
          })
        }
      } else if (state == 9) {
        console.log(11111111111111111111+'//////////////////////////');
        this.setData({
          sendTitle: "已取消"
        })
@@ -832,7 +868,7 @@
          points
        })
      } else if (this.data.state == 5) {
        console.log(resData,'resDataresDataresDataresData');
        // console.log(resData,'resDataresDataresDataresData');
        clearInterval(this.setTimer)
        var markers = [{
          iconPath: "../../img/map_car@3x.png",
@@ -1026,10 +1062,10 @@
        Authorization: "Bearer" + " " + wx.getStorageSync('token'),
      },
      success: (res) => {
        console.log(res, 4444, app.globalData.state !== res.data.data.state)
        // console.log(res, 4444, app.globalData.state !== res.data.data.state)
        // && app.globalData.state !== res.data.data.state
        if (res.data.code == 200 && res.data.data.state == 2) {
          console.log("------------------------------------------------------")
          // console.log("------------------------------------------------------")
          this.getDriveInfo()
          var markers = [{
            iconPath: "../../img/map_car@3x.png",
@@ -1067,12 +1103,12 @@
            sendTitle: "待出发",
          })
        } else if (res.data.data.state == 1 && app.globalData.state !== res.data.data.state) {
          console.log("------------------------------------------------------")
          // console.log("------------------------------------------------------")
          this.setData({
            sendTitle: "等待应答"
          })
        } else if (res.data.data.state == 3 && app.globalData.state !== res.data.data.state) {
          console.log("------------------------------------------------------")
          // console.log("------------------------------------------------------")
          var markers = [{
            iconPath: "../../img/map_car@3x.png",
@@ -1105,15 +1141,14 @@
              longitude: res.data.data.lon,
            },
          ]
          setTimeout(() => {
            this.getDriverLine({
          this.getDriverLine({
              latitude: res.data.data.lat,
              longitude: res.data.data.lon,
            }, {
              latitude: this.data.startLat,
              longitude: this.data.startLon,
            })
          }, 1000)
          this.setData({
            reservationMileage: res.data.data.reservationMileage, //司机距离距离
            reservationTime: res.data.data.reservationTime, //距离预约地点的时间
@@ -1122,7 +1157,7 @@
            sendTitle: "等待接驾"
          })
        } else if (res.data.data.state == 5 && app.globalData.state !== res.data.data.state) {
          console.log("------------------------------------------------------")
          // console.log("------------------------------------------------------")
          if (this.data.server5) {
            var points = [{
@@ -1155,7 +1190,7 @@
          clearInterval(this.setTimerTime)
          this.mapCtx = wx.createMapContext("map4select");
          this.mapCtx.translateMarker({
            markerId: 'map4select',
            markerId: 1,
            autoRotate: true,
            duration: 3000,
            destination: {
@@ -1163,7 +1198,7 @@
              longitude: res.data.data.lon,
            },
          }, {
            markerId: 'map',
            markerId: 2,
            autoRotate: true,
            duration: 3000,
            destination: {
@@ -1213,7 +1248,7 @@
          })
        } else if (res.data.data.state == 6 && app.globalData.state !== res.data.data.state) {
          console.log("------------------------------------------------------")
          // console.log("------------------------------------------------------")
          this.setData({
            closeOrder: false,
            closeOrderAdovad: false,
@@ -1227,7 +1262,7 @@
          let time = wx.getStorageSync('SERVER_TIME')
          console.log(this.formatTime(nowTime), '++++++++++++++++++')
          // console.log(this.formatTime(nowTime), '++++++++++++++++++')
          this.setTimerTime = setInterval(() => {
            this.setData({
              waitTimeTime: this.formatTime(new Date(time).getTime()),
@@ -1267,7 +1302,7 @@
            sendTitle: "支付费用"
          })
        } else if (res.data.data.state == 7 && app.globalData.state !== res.data.data.state) {
          console.log("1")
          // console.log("1")
          this.setData({
            showMap: false,
            showPay: true,
@@ -1337,7 +1372,7 @@
   * 用户点击右上角分享
   */
  onShareAppMessage: function (e) {
    console.log(e)
    // console.log(e)
    if (e.from === 'button') {
      this.setData({
        showPop: false
@@ -1363,7 +1398,7 @@
      title: '转发',
      path: '/pages/home/home',
      success: function (res) {
        console.log('成功', res)
        // console.log('成功', res)
      }
    }
  },
@@ -1386,7 +1421,7 @@
        code: wx.getStorageSync('adcode')
      })
      .then((res) => {
        console.log(res)
        // console.log(res)
        this.setData({
          homePhone: res.data.data
        })
@@ -1430,7 +1465,7 @@
          header: header,
          method: "POST",
          success: (res) => {
            console.log(res)
            // console.log(res)
            if (res.data.code == 200) {
              this.getMessage()
              this.setData({
@@ -1460,22 +1495,21 @@
          header: header,
          method: "POST",
          success: (res) => {
            console.log(res)
            // console.log(res)
            if (res.data.code == 200) {
              this.setData({
                showPayVan: false,
              })
              var jsonData = JSON.parse(res.data.data)
              console.log(jsonData)
              var jsonData = res.data.data
              wx.requestPayment({
                "timeStamp": jsonData.timestamp,
                "nonceStr": jsonData.noncestr,
                "timeStamp": jsonData.timeStamp,
                "nonceStr": jsonData.nonceStr,
                "package": jsonData.package,
                "signType": jsonData.signType,
                "paySign": jsonData.sign,
                "paySign":jsonData.sign,
                "success": (res) => {
                  let that = this
                  console.log(res)
                  // console.log(res)
                  that.getMessage()
                  that.setData({
                    payEnd: true,
@@ -1487,7 +1521,7 @@
                  clearInterval(this.data.getDriveIng)
                },
                "fail": function (res) {
                  console.log(res)
                  // console.log(res)
                }
              })
            } else {
@@ -1513,7 +1547,7 @@
        orderType: this.data.orderType
      })
      .then((res) => {
        console.log(res)
        // console.log(res)
        if (res.data.code == 200) {
          let money = "payStyle[" + 0 + "].money";
          let newmoney = "(" + res.data.data.balance + '可用' + ")"
@@ -1549,6 +1583,9 @@
      success: (res) => {
        console.log(res)
        if (res.data.code == 200) {
          this.setData({
            OrderInfo:res.data.data
          })
          if (res.data.data.endAddress == '') {
            this.setData({
              onekey: "1"
@@ -1561,7 +1598,7 @@
          // let timeNowPick  = timeNow.split(' ')[1].slice(4,timeNow.length-1).toString()
          // let  data = res.data.data.travelTime
          // let  changeDate = dataNow+' '+timeNowPick
          console.log(data, data - 30 * 60 * 1000, data - timeNow <= 30 * 60 * 1000)
          // console.log(data, data - 30 * 60 * 1000, data - timeNow <= 30 * 60 * 1000)
          if (data - timeNow >= 30 * 60 * 1000) {
            this.setData({
              showShowDom: true,
@@ -1650,7 +1687,7 @@
                orderType: this.data.orderType
              })
              .then((res2) => {
                console.log(res2)
                // console.log(res2)
                var markers = [{
                  iconPath: "../../img/map_car@3x.png",
                  id: 1,
@@ -1703,7 +1740,7 @@
                orderType: this.data.orderType
              })
              .then((res2) => {
                console.log(res2)
                // console.log(res2)
                var markers = [{
                  iconPath: "../../img/map_car@3x.png",
                  id: 1,
@@ -1845,11 +1882,11 @@
  getText: function (e) {
    var index = e.currentTarget.dataset.id
    var value = e.currentTarget.dataset.value
    console.log(value)
    // console.log(value)
    if (this.data.starId == 5) {
      var check = this.data.bq_text
      check[index].ischeck = !check[index].ischeck
      console.log(check)
      // console.log(check)
      this.setData({
        check: check
      })
@@ -1874,15 +1911,15 @@
      starId: this.data.starId,
      showDom: true
    })
    console.log(this.data.starId)
    // console.log(this.data.starId)
    if (e.currentTarget.dataset.index == 5) {
      console.log(e.currentTarget.dataset.index)
      // console.log(e.currentTarget.dataset.index)
      this.setData({
        showGood: true,
        showNo: false,
      })
    } else {
      console.log(e.currentTarget.dataset.index)
      // console.log(e.currentTarget.dataset.index)
      this.setData({
        showNo: true,
        showGood: false,
@@ -1907,7 +1944,7 @@
        }
      }
    }
    console.log(textArr)
    // console.log(textArr)
    if (this.data.starId > 0) {
      var header = {
        "content-type": "application/x-www-form-urlencoded",
@@ -1924,7 +1961,7 @@
          orderType: this.data.orderType
        },
        success: (res) => {
          console.log(res)
          // console.log(res)
          if (res.data.code == 200) {
            this.setData({
              pjdisabled: true,
@@ -1964,7 +2001,7 @@
        orderType: this.data.orderType
      })
      .then((res) => {
        console.log(res)
        // console.log(res)
        if (res.data.code == 200 && res.data.data.amount > 0) {
          this.setData({
            showPop: true,
@@ -1987,12 +2024,12 @@
        orderType: this.data.orderType
      })
      .then((res) => {
        console.log(res)
        // console.log(res)
      })
  },
  //点击支付方式
  onClick(event) {
    console.log(event)
    // console.log(event)
    const {
      name,
      index
pages/waiting/waiting.wxml
@@ -3,10 +3,10 @@
  <view class='status' style='height: {{status}}px;{{containerStyle}}'></view>
  <view class='navbar' style='height:{{navHeight}}px;{{containerStyle}}'>
    <view class='back-icon' catchtap="homeBack">
      <image src='/img/back@3x.png' style=""></image>
      <image src='/img/back@3x.png'></image>
    </view>
    <view class='nav-title'>
      <text style="height:{{navHeight}}px;line-height:{{navHeight}}px;font-size:30rpx;color:">{{sendTitle == '待支付' ? '行程结束' : sendTitle}}</text>
      <text style="height:{{navHeight}}px;line-height:{{navHeight}}px;font-size:30rpx;">{{sendTitle == '待支付' ? '行程结束' : sendTitle}}</text>
    </view>
  </view>
</view>
@@ -165,7 +165,7 @@
    <view hidden="{{payEnd}}" class="pay_view">
      <view class="please_pay">请支付</view>
      <view class="car_monery">¥{{money||0}}</view>
      <view class="please_pay" style="text-decoration:underline;padding-bottom:15rpx" catchtap="lookMoneyInfo">查看费用明细</view>
      <view class="please_pay" wx:if="{{OrderInfo.payManner==1}}" style="text-decoration:underline;padding-bottom:15rpx" catchtap="lookMoneyInfo">查看费用明细</view>
      <view class="tip_money" wx:if="{{tipMoney!=='0.00'}}">其中含小费:<span>¥{{tipMoney||0}}</span></view>
      <view class="iPay">若您已付款,请忽略!</view>
      <button class="button_pay" style="bottom:{{btuBottom+28}}rpx" disabled="{{false}}" catchtap="goPay">立即支付</button>
@@ -173,7 +173,7 @@
    <!--start-->
    <view class="start" hidden="{{!payEnd}}" style="{{modeSelectId == 2 ? 'padding-top:191rpx' : ''}}">
      <view class="car_monery" wx:if="{{money>0}}">¥{{money||0}}</view>
      <!-- <view class="please_pay" style="text-decoration:underline;padding-bottom:15rpx" catchtap="lookMoneyInfo">查看费用明细</view> -->
      <view class="please_pay" style="text-decoration:underline;padding-bottom:15rpx" catchtap="lookMoneyInfo">查看费用明细</view>
      <view class="noname {{modeSelectId == 2 ? 'font60' :''}}" wx:if="{{nmpj}}">匿名评价司机</view>
      <view class="noname {{modeSelectId == 2 ? 'font60' :''}}" wx:if="{{pjxq}}">评价详情</view>
      <!--遮罩层-->
@@ -199,12 +199,12 @@
        <image src="../../img/icon_close.png" catchtap="onClose"></image>
      </view>
      <view class="van_money car_monery">¥{{money||0}}</view>
      <view class="van_card" catchtap="getCou">
      <!-- <view class="van_card" catchtap="getCou">
        <view class="van_card_title">优惠券</view>
        <image src="../../img/icon_nav_open.png"></image>
        <view class="van_card_num" hidden="{{!showNumCoun}}">{{queryBalance.coupon==0?'0张可用券':'您有'+queryBalance.coupon+'张优惠券'}}</view>
        <view class="van_card_num" hidden="{{showNumCoun}}">{{moneyDown==""?'您有'+queryBalance.coupon+'张优惠券':'-'+moneyDown+'元'}}</view>
      </view>
      </view> -->
      <view class="select-item">
        <van-radio-group value="{{cancelOriginal}}" bind:change="onChange">
          <van-cell-group>
pages/waiting/waiting.wxss
@@ -506,7 +506,7 @@
.button_pay {
  width: 694rpx !important;
  height: 80rpx;
  background: rgba(74, 76, 89, 1);
  background: rgba(77, 139, 255, 1);
  border-radius: 8rpx;
  position: absolute;
  bottom: 28rpx;
@@ -524,7 +524,7 @@
.pay_button_btn {
  width: 650rpx !important;
  height: 80rpx;
  background: rgba(74, 76, 89, 1);
  background: rgba(77, 139, 255, 1);
  border-radius: 8rpx;
  margin: 44rpx auto;
  font-size: 28rpx;
project.config.json
@@ -18,7 +18,8 @@
      "ignore": [],
      "disablePlugins": [],
      "outputPath": ""
    }
    },
    "condition": false
  },
  "condition": {},
  "editorSetting": {
utils/ajax.js
@@ -91,10 +91,12 @@
const ajax = new Ajax({
  //  baseURL: 'http://192.168.0.49:81/api',
  // baseURL:"http://192.168.0.80:80/user"
  // baseURL:"http://192.168.110.34:7777/user"
  baseURL:"http://221.182.45.100:7777/user"
  // baseURL:"http://39.108.148.228:80/user"
  // baseURL: 'http://120.220.4.138:9591/user',
  baseURL: 'https://xn95128.cn/user',
  // baseURL: 'https://xn95128.cn/user',
  
})
utils/bmap-wx.js
New file
@@ -0,0 +1,452 @@
/**
 * @file 微信小程序JSAPI
 * @author 崔健 cuijian03@baidu.com 2017.01.10
 * @update 邓淑芳 623996689@qq.com 2019.07.03
 */
/**
 * 百度地图微信小程序API类
 *
 * @class
 */
class BMapWX {
    /**
     * 百度地图微信小程序API类
     *
     * @constructor
     */
    constructor(param) {
      this.ak = param["ak"];
    }
    /**
     * 使用微信接口进行定位
     *
     * @param {string} type 坐标类型
     * @param {Function} success 成功执行
     * @param {Function} fail 失败执行
     * @param {Function} complete 完成后执行
     */
    getWXLocation(type, success, fail, complete) {
      type = type || 'gcj02',
      success = success || function () { };
      fail = fail || function () { };
      complete = complete || function () { };
      wx.getLocation({
        type: type,
        success: success,
        fail: fail,
        complete: complete
      });
    }
    /**
     * POI周边检索
     *
     * @param {Object} param 检索配置
     * 参数对象结构可以参考
     * http://lbsyun.baidu.com/index.php?title=webapi/guide/webservice-placeapi
     */
    search(param) {
      var that = this;
      param = param || {};
      let searchparam = {
        query: param["query"] || '生活服务$美食&酒店',
        scope: param["scope"] || 1,
        filter: param["filter"] || '',
        coord_type: param["coord_type"] || 2,
        page_size: param["page_size"] || 10,
        page_num: param["page_num"] || 0,
        output: param["output"] || 'json',
        ak: that.ak,
        sn: param["sn"] || '',
        timestamp: param["timestamp"] || '',
        radius: param["radius"] || 2000,
        ret_coordtype: 'gcj02ll'
      };
      let otherparam = {
        iconPath: param["iconPath"],
        iconTapPath: param["iconTapPath"],
        width: param["width"],
        height: param["height"],
        alpha: param["alpha"] || 1,
        success: param["success"] || function () { },
        fail: param["fail"] || function () { }
      };
      let type = 'gcj02';
      let locationsuccess = function (result) {
        searchparam["location"] = result["latitude"] + ',' + result["longitude"];
        wx.request({
          url: 'https://api.map.baidu.com/place/v2/search',
          data: searchparam,
          header: {
            "content-type": "application/json"
          },
          method: 'GET',
          success(data) {
            let res = data["data"];
            if (res["status"] === 0) {
              let poiArr = res["results"];
              // outputRes 包含两个对象,
              // originalData为百度接口返回的原始数据
              // wxMarkerData为小程序规范的marker格式
              let outputRes = {};
              outputRes["originalData"] = res;
              outputRes["wxMarkerData"] = [];
              for (let i = 0; i < poiArr.length; i++) {
                outputRes["wxMarkerData"][i] = {
                  id: i,
                  latitude: poiArr[i]["location"]["lat"],
                  longitude: poiArr[i]["location"]["lng"],
                  title: poiArr[i]["name"],
                  iconPath: otherparam["iconPath"],
                  iconTapPath: otherparam["iconTapPath"],
                  address: poiArr[i]["address"],
                  telephone: poiArr[i]["telephone"],
                  alpha: otherparam["alpha"],
                  width: otherparam["width"],
                  height: otherparam["height"]
                }
              }
              otherparam.success(outputRes);
            } else {
              otherparam.fail({
                errMsg: res["message"],
                statusCode: res["status"]
              });
            }
          },
          fail(data) {
            otherparam.fail(data);
          }
        });
      }
      let locationfail = function (result) {
        otherparam.fail(result);
      };
      let locationcomplete = function (result) {
      };
      if (!param["location"]) {
        that.getWXLocation(type, locationsuccess, locationfail, locationcomplete);
      } else {
        let longitude = param.location.split(',')[1];
        let latitude = param.location.split(',')[0];
        let errMsg = 'input location';
        let res = {
          errMsg: errMsg,
          latitude: latitude,
          longitude: longitude
        };
        locationsuccess(res);
      }
    }
    /**
     * sug模糊检索
     *
     * @param {Object} param 检索配置
     * 参数对象结构可以参考
     * http://lbsyun.baidu.com/index.php?title=webapi/place-suggestion-api
     */
    suggestion(param) {
      var that = this;
      param = param || {};
      let suggestionparam = {
        query: param["query"] || '',
        region: param["region"] || '全国',
        city_limit: param["city_limit"] || false,
        output: param["output"] || 'json',
        ak: that.ak,
        sn: param["sn"] || '',
        timestamp: param["timestamp"] || '',
        ret_coordtype: 'gcj02ll'
      };
      let otherparam = {
        success: param["success"] || function () { },
        fail: param["fail"] || function () { }
      };
      wx.request({
        url: 'https://api.map.baidu.com/place/v2/suggestion',
        data: suggestionparam,
        header: {
          "content-type": "application/json"
        },
        method: 'GET',
        success(data) {
          let res = data["data"];
          if (res["status"] === 0) {
            otherparam.success(res);
          } else {
            otherparam.fail({
              errMsg: res["message"],
              statusCode: res["status"]
            });
          }
        },
        fail(data) {
          otherparam.fail(data);
        }
      });
    }
    /**
     * rgc检索(逆地理编码:经纬度->地点描述)
     *
     * @param {Object} param 检索配置
     * 参数对象结构可以参考
     * https://lbs.baidu.com/index.php?title=webapi/guide/webservice-geocoding-abroad
     *
     */
    regeocoding (param) {
      var that = this;
      param = param || {};
      let regeocodingparam = {
        coordtype: param["coordtype"] || 'gcj02ll',
        ret_coordtype: 'gcj02ll',
        radius: param["radius"] || 1000,
        ak: that.ak,
        sn: param["sn"] || '',
        output: param["output"] || 'json',
        callback: param["callback"] || function () { },
        extensions_poi: param["extensions_poi"] || 1,
        extensions_road: param["extensions_road"] || false,
        extensions_town: param["extensions_town"] || false,
        language: param["language"] || 'zh-CN',
        language_auto: param["language_auto"] || 0
      };
      let otherparam = {
        iconPath: param["iconPath"],
        iconTapPath: param["iconTapPath"],
        width: param["width"],
        height: param["height"],
        alpha: param["alpha"] || 1,
        success: param["success"] || function () { },
        fail: param["fail"] || function () { }
      };
      let type = 'gcj02';
      let locationsuccess = function (result) {
        regeocodingparam["location"] = result["latitude"] + ',' + result["longitude"];
        wx.request({
          url: 'https://api.map.baidu.com/reverse_geocoding/v3',
          data: regeocodingparam,
          header: {
            "content-type": "application/json"
          },
          method: 'GET',
          success(data) {
            let res = data["data"];
            if (res["status"] === 0) {
              let poiObj = res["result"];
              // outputRes 包含两个对象:
              // originalData为百度接口返回的原始数据
              // wxMarkerData为小程序规范的marker格式
              let outputRes = {};
              outputRes["originalData"] = res;
              outputRes["wxMarkerData"] = [];
              outputRes["wxMarkerData"][0] = {
                id: 0,
                latitude: result["latitude"],
                longitude: result["longitude"],
                address: poiObj["formatted_address"],
                iconPath: otherparam["iconPath"],
                iconTapPath: otherparam["iconTapPath"],
                desc: poiObj["sematic_description"],
                business: poiObj["business"],
                alpha: otherparam["alpha"],
                width: otherparam["width"],
                height: otherparam["height"]
              }
              otherparam.success(outputRes);
            } else {
              otherparam.fail({
                errMsg: res["message"],
                statusCode: res["status"]
              });
            }
          },
          fail(data) {
            otherparam.fail(data);
          }
        });
      };
      let locationfail = function (result) {
        otherparam.fail(result);
      }
      let locationcomplete = function (result) {
      };
      if (!param["location"]) {
        that.getWXLocation(type, locationsuccess, locationfail, locationcomplete);
      } else {
        let longitude = param.location.split(',')[1];
        let latitude = param.location.split(',')[0];
        let errMsg = 'input location';
        let res = {
          errMsg: errMsg,
          latitude: latitude,
          longitude: longitude
        };
        locationsuccess(res);
      }
    }
    /**
     * gc检索(地理编码:地点->经纬度)
     *
     * @param {Object} param 检索配置
     * 参数对象结构可以参考
     * https://lbs.baidu.com/index.php?title=webapi/guide/webservice-geocoding
     *
     */
    geocoding(param) {
      var that = this;
      param = param || {};
      let geocodingparam = {
        address: param["address"] || '',
        city: param["city"] || '',
        ret_coordtype: param["coordtype"] || 'gcj02ll',
        ak: that.ak,
        sn: param["sn"] || '',
        output: param["output"] || 'json',
        callback: param["callback"] || function () { }
      };
      let otherparam = {
        iconPath: param["iconPath"],
        iconTapPath: param["iconTapPath"],
        width: param["width"],
        height: param["height"],
        alpha: param["alpha"] || 1,
        success: param["success"] || function () { },
        fail: param["fail"] || function () { }
      };
      if (param["address"]) {
        wx.request({
          url: 'https://api.map.baidu.com/geocoding/v3',
          data: geocodingparam,
          header: {
            "content-type": "application/json"
          },
          method: 'GET',
          success(data) {
            let res = data["data"];
            if (res["status"] === 0){
              let poiObj = res["result"];
              // outputRes 包含两个对象:
              // originalData为百度接口返回的原始数据
              // wxMarkerData为小程序规范的marker格式
              let outputRes = res;
              outputRes["originalData"] = res;
              outputRes["wxMarkerData"] = [];
              outputRes["wxMarkerData"][0] = {
                id: 0,
                latitude: poiObj["location"]["lat"],
                longitude: poiObj["location"]["lng"],
                iconPath: otherparam["iconPath"],
                iconTapPath: otherparam["iconTapPath"],
                alpha: otherparam["alpha"],
                width: otherparam["width"],
                height: otherparam["height"]
              }
              otherparam.success(outputRes);
            } else {
              otherparam.fail({
                errMsg: res["message"],
                statusCode: res["status"]
              });
            }
          },
          fail(data) {
            otherparam.fail(data);
          }
        });
      } else {
        let errMsg = 'input address!';
        let res = {
          errMsg: errMsg
        };
        otherparam.fail(res);
      }
    }
    /**
     * 天气检索
     *
     * @param {Object} param 检索配置
     */
    weather(param) {
      var that = this;
      param = param || {};
      let weatherparam = {
        coord_type: param["coord_type"] || 'gcj02',
        output: param["output"] || 'json',
        ak: that.ak,
        sn: param["sn"] || '',
        timestamp: param["timestamp"] || ''
      };
      let otherparam = {
        success: param["success"] || function () { },
        fail: param["fail"] || function () { }
      };
      let type = 'gcj02';
      let locationsuccess = function (result) {
        weatherparam["location"] = result["longitude"] + ',' + result["latitude"];
        wx.request({
          url: 'https://api.map.baidu.com/telematics/v3/weather',
          data: weatherparam,
          header: {
            "content-type": "application/json"
          },
          method: 'GET',
          success(data) {
            let res = data["data"];
            if (res["error"] === 0 && res["status"] === 'success') {
              let weatherArr = res["results"];
              // outputRes 包含两个对象,
              // originalData为百度接口返回的原始数据
              // wxMarkerData为小程序规范的marker格式
              let outputRes = {};
              outputRes["originalData"] = res;
              outputRes["currentWeather"] = [];
              outputRes["currentWeather"][0] = {
                currentCity: weatherArr[0]["currentCity"],
                pm25: weatherArr[0]["pm25"],
                date: weatherArr[0]["weather_data"][0]["date"],
                temperature: weatherArr[0]["weather_data"][0]["temperature"],
                weatherDesc: weatherArr[0]["weather_data"][0]["weather"],
                wind: weatherArr[0]["weather_data"][0]["wind"]
              };
              otherparam.success(outputRes);
            } else {
              otherparam.fail({
                errMsg: res["message"],
                statusCode: res["status"]
              });
            }
          },
          fail(data) {
            otherparam.fail(data);
          }
        });
      }
      let locationfail = function (result) {
        otherparam.fail(result);
      }
      let locationcomplete = function (result) {
      }
      if (!param["location"]) {
        that.getWXLocation(type, locationsuccess, locationfail, locationcomplete);
      } else {
        let longitude = param.location.split(',')[0];
        let latitude = param.location.split(',')[1];
        let errMsg = 'input location';
        let res = {
          errMsg: errMsg,
          latitude: latitude,
          longitude: longitude
        };
        locationsuccess(res);
      }
    }
  }
  module.exports.BMapWX = BMapWX;
utils/bmap-wx.min.js
New file
@@ -0,0 +1 @@
"use strict"; function _classCallCheck(t, a) { if (!(t instanceof a)) throw new TypeError("Cannot call a class as a function") } var _createClass = function () { function t(t, a) { for (var e = 0; e < a.length; e++) { var i = a[e]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i) } } return function (a, e, i) { return e && t(a.prototype, e), i && t(a, i), a } }(), BMapWX = function () { function t(a) { _classCallCheck(this, t), this.ak = a.ak } return _createClass(t, [{ key: "getWXLocation", value: function (t, a, e, i) { t = t || "gcj02", a = a || function () { }, e = e || function () { }, i = i || function () { }, wx.getLocation({ type: t, success: a, fail: e, complete: i }) } }, { key: "search", value: function (t) { var a = this; t = t || {}; var e = { query: t.query || "生活服务$美食&酒店", scope: t.scope || 1, filter: t.filter || "", coord_type: t.coord_type || 2, page_size: t.page_size || 10, page_num: t.page_num || 0, output: t.output || "json", ak: a.ak, sn: t.sn || "", timestamp: t.timestamp || "", radius: t.radius || 2e3, ret_coordtype: "gcj02ll" }, i = { iconPath: t.iconPath, iconTapPath: t.iconTapPath, width: t.width, height: t.height, alpha: t.alpha || 1, success: t.success || function () { }, fail: t.fail || function () { } }, n = function (t) { e.location = t.latitude + "," + t.longitude, wx.request({ url: "https://api.map.baidu.com/place/v2/search", data: e, header: { "content-type": "application/json" }, method: "GET", success: function (t) { var a = t.data; if (0 === a.status) { var e = a.results, n = {}; n.originalData = a, n.wxMarkerData = []; for (var s = 0; s < e.length; s++)n.wxMarkerData[s] = { id: s, latitude: e[s].location.lat, longitude: e[s].location.lng, title: e[s].name, iconPath: i.iconPath, iconTapPath: i.iconTapPath, address: e[s].address, telephone: e[s].telephone, alpha: i.alpha, width: i.width, height: i.height }; i.success(n) } else i.fail({ errMsg: a.message, statusCode: a.status }) }, fail: function (t) { i.fail(t) } }) }, s = function (t) { i.fail(t) }, o = function (t) { }; if (t.location) { var c = t.location.split(",")[1]; n({ errMsg: "input location", latitude: t.location.split(",")[0], longitude: c }) } else a.getWXLocation("gcj02", n, s, o) } }, { key: "suggestion", value: function (t) { var a = this; t = t || {}; var e = { query: t.query || "", region: t.region || "全国", city_limit: t.city_limit || !1, output: t.output || "json", ak: a.ak, sn: t.sn || "", timestamp: t.timestamp || "", ret_coordtype: "gcj02ll" }, i = { success: t.success || function () { }, fail: t.fail || function () { } }; wx.request({ url: "https://api.map.baidu.com/place/v2/suggestion", data: e, header: { "content-type": "application/json" }, method: "GET", success: function (t) { var a = t.data; 0 === a.status ? i.success(a) : i.fail({ errMsg: a.message, statusCode: a.status }) }, fail: function (t) { i.fail(t) } }) } }, { key: "regeocoding", value: function (t) { var a = this; t = t || {}; var e = { coordtype: t.coordtype || "gcj02ll", ret_coordtype: "gcj02ll", radius: t.radius || 1e3, ak: a.ak, sn: t.sn || "", output: t.output || "json", callback: t.callback || function () { }, extensions_poi: t.extensions_poi || 1, extensions_road: t.extensions_road || !1, extensions_town: t.extensions_town || !1, language: t.language || "zh-CN", language_auto: t.language_auto || 0 }, i = { iconPath: t.iconPath, iconTapPath: t.iconTapPath, width: t.width, height: t.height, alpha: t.alpha || 1, success: t.success || function () { }, fail: t.fail || function () { } }, n = function (t) { e.location = t.latitude + "," + t.longitude, wx.request({ url: "https://api.map.baidu.com/reverse_geocoding/v3", data: e, header: { "content-type": "application/json" }, method: "GET", success: function (a) { var e = a.data; if (0 === e.status) { var n = e.result, s = {}; s.originalData = e, s.wxMarkerData = [], s.wxMarkerData[0] = { id: 0, latitude: t.latitude, longitude: t.longitude, address: n.formatted_address, iconPath: i.iconPath, iconTapPath: i.iconTapPath, desc: n.sematic_description, business: n.business, alpha: i.alpha, width: i.width, height: i.height }, i.success(s) } else i.fail({ errMsg: e.message, statusCode: e.status }) }, fail: function (t) { i.fail(t) } }) }, s = function (t) { i.fail(t) }, o = function (t) { }; if (t.location) { var c = t.location.split(",")[1]; n({ errMsg: "input location", latitude: t.location.split(",")[0], longitude: c }) } else a.getWXLocation("gcj02", n, s, o) } }, { key: "geocoding", value: function (t) { var a = this; t = t || {}; var e = { address: t.address || "", city: t.city || "", ret_coordtype: t.coordtype || "gcj02ll", ak: a.ak, sn: t.sn || "", output: t.output || "json", callback: t.callback || function () { } }, i = { iconPath: t.iconPath, iconTapPath: t.iconTapPath, width: t.width, height: t.height, alpha: t.alpha || 1, success: t.success || function () { }, fail: t.fail || function () { } }; if (t.address) wx.request({ url: "https://api.map.baidu.com/geocoding/v3", data: e, header: { "content-type": "application/json" }, method: "GET", success: function (t) { var a = t.data; if (0 === a.status) { var e = a.result, n = a; n.originalData = a, n.wxMarkerData = [], n.wxMarkerData[0] = { id: 0, latitude: e.location.lat, longitude: e.location.lng, iconPath: i.iconPath, iconTapPath: i.iconTapPath, alpha: i.alpha, width: i.width, height: i.height }, i.success(n) } else i.fail({ errMsg: a.message, statusCode: a.status }) }, fail: function (t) { i.fail(t) } }); else { var n = { errMsg: "input address!" }; i.fail(n) } } }, { key: "weather", value: function (t) { var a = this; t = t || {}; var e = { coord_type: t.coord_type || "gcj02", output: t.output || "json", ak: a.ak, sn: t.sn || "", timestamp: t.timestamp || "" }, i = { success: t.success || function () { }, fail: t.fail || function () { } }, n = function (t) { e.location = t.longitude + "," + t.latitude, wx.request({ url: "https://api.map.baidu.com/telematics/v3/weather", data: e, header: { "content-type": "application/json" }, method: "GET", success: function (t) { var a = t.data; if (0 === a.error && "success" === a.status) { var e = a.results, n = {}; n.originalData = a, n.currentWeather = [], n.currentWeather[0] = { currentCity: e[0].currentCity, pm25: e[0].pm25, date: e[0].weather_data[0].date, temperature: e[0].weather_data[0].temperature, weatherDesc: e[0].weather_data[0].weather, wind: e[0].weather_data[0].wind }, i.success(n) } else i.fail({ errMsg: a.message, statusCode: a.status }) }, fail: function (t) { i.fail(t) } }) }, s = function (t) { i.fail(t) }, o = function (t) { }; if (t.location) { var c = t.location.split(",")[0]; n({ errMsg: "input location", latitude: t.location.split(",")[1], longitude: c }) } else a.getWXLocation("gcj02", n, s, o) } }]), t }(); module.exports.BMapWX = BMapWX;
utils/util.js
@@ -1,3 +1,6 @@
const BaiduMap = require('./bmap-wx.min')
const formatTime = date => {
  const year = date.getFullYear()
  const month = date.getMonth() + 1
@@ -23,177 +26,179 @@
  return n[1] ? n : '0' + n
}
const timestampToTime = (timestamp) => {
    var date = new Date(timestamp); // 时间戳为10位需*1000,时间戳为13位的话不需乘1000
    var Y = date.getFullYear() + '-';
    var M = (date.getMonth() + 1 < 10 ? '0' + (
        date.getMonth() + 1
    ) : date.getMonth() + 1) + '-';
    var D = (date.getDate() + 1 < 10 ? '0' + (
        date.getDate()
    ) : date.getDate()) + ' '
    var h = date.getHours() + ':';
    var m = date.getMinutes() + ':';
    var s = date.getSeconds();
    return Y + M + D + h + m + s;
  var date = new Date(timestamp); // 时间戳为10位需*1000,时间戳为13位的话不需乘1000
  var Y = date.getFullYear() + '-';
  var M = (date.getMonth() + 1 < 10 ? '0' + (
    date.getMonth() + 1
  ) : date.getMonth() + 1) + '-';
  var D = (date.getDate() + 1 < 10 ? '0' + (
    date.getDate()
  ) : date.getDate()) + ' '
  var h = date.getHours() + ':';
  var m = date.getMinutes() + ':';
  var s = date.getSeconds();
  return Y + M + D + h + m + s;
}
//时分秒换算
const date_format =(micro_second) => {
    // 总秒数
    var second = Math.floor(micro_second / 1000);
    // 天数
    var day = Math.floor(second / 3600 / 24);
    // 小时
    var hr = Math.floor(second / 3600 % 24);
    // 分钟
    var min = Math.floor(second / 60 % 60);
    // 秒
    var sec = Math.floor(second % 60);
    return day + "天" + hr + "小时"+' '+ min + ":" + sec ;
    };
const date_format = (micro_second) => {
  // 总秒数
  var second = Math.floor(micro_second / 1000);
  // 天数
  var day = Math.floor(second / 3600 / 24);
  // 小时
  var hr = Math.floor(second / 3600 % 24);
  // 分钟
  var min = Math.floor(second / 60 % 60);
  // 秒
  var sec = Math.floor(second % 60);
  return day + "天" + hr + "小时" + ' ' + min + ":" + sec;
};
    export const getSetting = () => {
      wx.getSetting({
        success: (res) => {
          if(res.authSetting['scope.userLocation']==false){
            wx.showModal({
              content: '检测到您没打开定位权限,是否去设置打开?',
              confirmText: "确认",
              cancelText: "取消",
              success:(res)=>{
                  if(res.confirm){
                    wx.openSetting({
export const getSetting = () => {
  wx.getSetting({
    success: (res) => {
      if (res.authSetting['scope.userLocation'] == false) {
        wx.showModal({
          content: '检测到您没打开定位权限,是否去设置打开?',
          confirmText: "确认",
          cancelText: "取消",
          success: (res) => {
            if (res.confirm) {
              wx.openSetting({
                success: (res) => {
                  if (res.authSetting['scope.userLocation'] == true) {
                    wx.showToast({
                      title: '授权成功',
                      icon: 'success',
                      duration: 1000
                    })
                    //接入百度地图方法
                    var bmap = new BaiduMap.BMapWX({
                      ak: 'fi3HGJjW153NCNsaTb9FekxeX1Lj3auo' // 必填,您的key
                    })
                    bmap.regeocoding({
                      // coordtype:'bd09ll',
                      success: (res) => {
                        if(res.authSetting['scope.userLocation']==true){
                          wx.showToast({
                            title: '授权成功',
                            icon:'success',
                            duration:1000
                          })
                          //接入高地地图调用.....
                          // var myAmapFun = new GdMap.AMapWX({ key: 'a825dd33982ba213f2be3e83ad2f9a9b' });
                          var myAmapFun = new GdMap.AMapWX({ key: '386d4020bf067658716dba6c38bc91dd' });
                          myAmapFun.getRegeo({
                            success: (res) => {
                              // that.setData({
                              //   cityName:res[0].regeocodeData.addressComponent.city,
                              //   latitude: res[0].latitude,
                              //   longitude:res[0].longitude,
                              //   adcode:res[0].regeocodeData.addressComponent.adcode,
                              //   cityNameStart:res[0].name,
                              //   district:res[0].regeocodeData.addressComponent.province,
                              //   formatted_address:res[0].regeocodeData.formatted_address
                              // })
                              wx.setStorageSync('latitude', res[0].latitude)
                              wx.setStorageSync('longitude', res[0].longitude)
                              wx.setStorageSync('adcode', res[0].regeocodeData.addressComponent.adcode)
                              wx.setStorageSync('cityName', res[0].regeocodeData.addressComponent.city)
                              wx.setStorageSync('cityNameStart', res[0].name)
                              wx.setStorageSync('district', res[0].regeocodeData.addressComponent.district)
                              wx.setStorageSync('province', res[0].regeocodeData.addressComponent.province)
                              wx.setStorageSync('formatted_address', res[0].regeocodeData.formatted_address)
                            }
                          })
                        }
                      },
                        // that.setData({
                        //   cityName:res[0].regeocodeData.addressComponent.city,
                        //   latitude: res[0].latitude,
                        //   longitude:res[0].longitude,
                        //   adcode:res[0].regeocodeData.addressComponent.adcode,
                        //   cityNameStart:res[0].name,
                        //   district:res[0].regeocodeData.addressComponent.province,
                        //   formatted_address:res[0].regeocodeData.formatted_address
                        // })
                        wx.setStorageSync('latitude', res.originalData.result.location.lat)
                          wx.setStorageSync('longitude', res.originalData.result.location.lng)
                          wx.setStorageSync('adcode', res.originalData.result.addressComponent.adcode)
                          wx.setStorageSync('cityName', res.originalData.result.addressComponent.city)
                          wx.setStorageSync('cityNameStart', res.originalData.result.pois[0].addr)
                          wx.setStorageSync('district', res.originalData.result.addressComponent.district)
                          wx.setStorageSync('province', res.originalData.result.addressComponent.province)
                          wx.setStorageSync('formatted_address', res.originalData.result.formatted_address)
                      }
                    })
                  }
              }
            })
                },
              })
            }
          }
        },
      })
    };
        })
      }
    },
  })
};
//
export const sizeNum = (obj, num = 2) => {
    var str = "";
    var obj = obj.toString();
    if (obj.length > num) {
        return `${obj}`;
    }
    for (var i = 1; i < num + 1; i++) {
        if (obj.length == i) {
            for (var j = 0; j < num - i; j++) {
                str += "0";
            }
            return `${str}${obj}`;
        }
  var str = "";
  var obj = obj.toString();
  if (obj.length > num) {
    return `${obj}`;
  }
  for (var i = 1; i < num + 1; i++) {
    if (obj.length == i) {
      for (var j = 0; j < num - i; j++) {
        str += "0";
      }
      return `${str}${obj}`;
    }
  }
};
//js 查询当前星期几
function get7Days(daysTime){
    //获取系统当前时间
    var now = new Date();
    var nowTime = daysTime||now.getTime() ;
    var oneDayTime = 24*60*60*1000 ;
    var day = []
    for(var i = 0 ; i < 6 ; i++){
        //显示周一
        var ShowTime = nowTime + i*oneDayTime ;
        //初始化日期时间
        var myDate = new Date(ShowTime);
        var year=myDate.getFullYear();
        var month=myDate.getMonth()+1;
        var date=myDate.getDate();
        var str = "星期" + "日一二三四五六".charAt(myDate.getDay());
        var arr = {
            days :month+"/"+date,
            str:str,
            year:year+"-"+month+"-"+date
        }
        day.push(arr)
    }
    return   day
function get7Days(daysTime) {
  //获取系统当前时间
  var now = new Date();
  var nowTime = daysTime || now.getTime();
  var oneDayTime = 24 * 60 * 60 * 1000;
  var day = []
  for (var i = 0; i < 6; i++) {
    //显示周一
    var ShowTime = nowTime + i * oneDayTime;
    //初始化日期时间
    var myDate = new Date(ShowTime);
    var year = myDate.getFullYear();
    var month = myDate.getMonth() + 1;
    var date = myDate.getDate();
    var str = "星期" + "日一二三四五六".charAt(myDate.getDay());
    var arr = {
      days: month + "/" + date,
      str: str,
      year: year + "-" + month + "-" + date
    }
    day.push(arr)
  }
  return day
}
const OBSupload = function(filePath) {
const OBSupload = function (filePath) {
  return new Promise(resolve => {
      if (!filePath) {
          uni.showToast({
              title: "文件路径不能为空",
              icon: "请重新选择路径",
          });
          return;
      }
      const fileName = "wximg" + new Date().getTime() + ".png"; //"testMiniprogram.jpg"; //指定上传
      console.log("开始上传----");
      wx.uploadFile({
          url: 'https://jiayixing-bucket.oss-cn-beijing.aliyuncs.com',
          filePath: filePath,
          name: "file",
          formData: {
              key: fileName,
          },
          success: function(res) {
              if (res.statusCode == "204") {
                  console.log("上传图片成功", res);
                  resolve({
                      status: "ok",
                      data: `${'https://xn95128.cn/user-server/upload/image'.EndPoint}/${fileName}`,
                      // xgj
                      url: "https://jiayixing-bucket.oss-cn-beijing.aliyuncs.com/" + fileName
                  });
                  wx.showToast({
                      title: "上传成功",
                  });
              } else {
                  console.log("上传图片失败", res);
                  wx.showToast({
                      title: "上传失败",
                      icon: "fail",
                  });
              }
          },
          fail: function(e) {
              console.log("上传失败", e);
          },
    if (!filePath) {
      uni.showToast({
        title: "文件路径不能为空",
        icon: "请重新选择路径",
      });
      return;
    }
    const fileName = "wximg" + new Date().getTime() + ".png"; //"testMiniprogram.jpg"; //指定上传
    console.log("开始上传----");
    wx.uploadFile({
      url: 'https://jiayixing-bucket.oss-cn-beijing.aliyuncs.com',
      filePath: filePath,
      name: "file",
      formData: {
        key: fileName,
      },
      success: function (res) {
        if (res.statusCode == "204") {
          console.log("上传图片成功", res);
          resolve({
            status: "ok",
            data: `${'https://xn95128.cn/user-server/upload/image'.EndPoint}/${fileName}`,
            // xgj
            url: "https://jiayixing-bucket.oss-cn-beijing.aliyuncs.com/" + fileName
          });
          wx.showToast({
            title: "上传成功",
          });
        } else {
          console.log("上传图片失败", res);
          wx.showToast({
            title: "上传失败",
            icon: "fail",
          });
        }
      },
      fail: function (e) {
        console.log("上传失败", e);
      },
    });
  });
};
// 封装post请求
const post = (url,data) => {
const post = (url, data) => {
  wx.showLoading({})
  var promise = new Promise((resolve, reject) => {
@@ -202,50 +207,50 @@
      url: url,
      data: data,
      method: 'POST',
      header: {
      header: {
        "content-type": "application/x-www-form-urlencoded",
        Authorization: "Bearer" + " " + wx.getStorageSync('token'),
      },
      success: function (res) {//服务器返回数据
        console.log(res,'========================');
      success: function (res) { //服务器返回数据
        console.log(res, '========================');
        if (res.statusCode == 200) {
          resolve(res);
          wx.hideLoading({})
        }
        if((res.data.message=='token验证失败'||res.data.message=='TOKEN_INVALID')&&wx.getStorageSync('token')&&wx.getStorageSync('token')!=='quit'){
        }
        if ((res.data.message == 'token验证失败' || res.data.message == 'TOKEN_INVALID') && wx.getStorageSync('token') && wx.getStorageSync('token') !== 'quit') {
          wx.showModal({
            title: '提示',
            content: '登录过期是否重新登录',
            showCancel: true,
            confirmText:"确定",//默认是“确定”
            confirmColor: '#F07207',//确定文字的颜色
            success:  (res) =>{
               if (res.cancel) {
                  //点击取消,默认隐藏弹框
               } else {
                   wx.redirectTo({
                     url: '/pages/index/index',
                   })
                   clearInterval(app.globalData.comparisonToken)
               }
            confirmText: "确定", //默认是“确定”
            confirmColor: '#F07207', //确定文字的颜色
            success: (res) => {
              if (res.cancel) {
                //点击取消,默认隐藏弹框
              } else {
                wx.redirectTo({
                  url: '/pages/index/index',
                })
                clearInterval(app.globalData.comparisonToken)
              }
            },
            fail: function (res) { },//接口调用失败的回调函数
            complete: function (res) { },//接口调用结束的回调函数(调用成功、失败都会执行)
         })
            fail: function (res) {}, //接口调用失败的回调函数
            complete: function (res) {}, //接口调用结束的回调函数(调用成功、失败都会执行)
          })
        }
         if(res.data.code == 600&&(wx.getStorageSync('token')==''||wx.getStorageSync('token')=='quit')){
        if (res.data.code == 600 && (wx.getStorageSync('token') == '' || wx.getStorageSync('token') == 'quit')) {
          wx.redirectTo({
            url: '/pages/index/index',
          })
        }
        resolve(res)
      },
      fail:function(e){
      fail: function (e) {
        wx.showToast({
          title: '网络错误',
          image:null,
          icon:"none",
          duration:3000
          image: null,
          icon: "none",
          duration: 3000
        })
        wx.hideLoading({})
        console.log(e)
@@ -268,54 +273,54 @@
        'content-type': 'application/json',
        'token': wx.getStorageSync('token')
      },
      success: function (res) {//服务器返回数据
      success: function (res) { //服务器返回数据
        if (res.statusCode == 200) {
          resolve(res);
          wx.hideLoading({})
        }
        if((res.data.message=='token验证失败'||res.data.message=='TOKEN_INVALID')&&wx.getStorageSync('token')&&wx.getStorageSync('token')!=='quit'){
        }
        if ((res.data.message == 'token验证失败' || res.data.message == 'TOKEN_INVALID') && wx.getStorageSync('token') && wx.getStorageSync('token') !== 'quit') {
          wx.showModal({
            title: '提示',
            content: '登录过期是否重新登录',
            showCancel: true,
            confirmText:"确定",//默认是“确定”
            confirmColor: '#F07207',//确定文字的颜色
            success:  (res) =>{
               if (res.cancel) {
                  //点击取消,默认隐藏弹框
               } else {
                   wx.redirectTo({
                     url: '/pages/index/index',
                   })
                   clearInterval(app.globalData.comparisonToken)
               }
            confirmText: "确定", //默认是“确定”
            confirmColor: '#F07207', //确定文字的颜色
            success: (res) => {
              if (res.cancel) {
                //点击取消,默认隐藏弹框
              } else {
                wx.redirectTo({
                  url: '/pages/index/index',
                })
                clearInterval(app.globalData.comparisonToken)
              }
            },
            fail: function (res) { },//接口调用失败的回调函数
            complete: function (res) { },//接口调用结束的回调函数(调用成功、失败都会执行)
         })
            fail: function (res) {}, //接口调用失败的回调函数
            complete: function (res) {}, //接口调用结束的回调函数(调用成功、失败都会执行)
          })
        }
         if(res.data.code == 600&&(wx.getStorageSync('token')==''||wx.getStorageSync('token')=='quit')){
        if (res.data.code == 600 && (wx.getStorageSync('token') == '' || wx.getStorageSync('token') == 'quit')) {
          wx.redirectTo({
            url: '/pages/index/index',
          })
        }
        resolve(res)
      },
      fail:function(e){
      fail: function (e) {
        wx.showToast({
            title: '网络错误',
            image:null,
            icon:"none",
            duration:3000
          })
          wx.hideLoading({})
          reject(e);
          title: '网络错误',
          image: null,
          icon: "none",
          duration: 3000
        })
        wx.hideLoading({})
        reject(e);
      }
    })
  });
  return promise;
}
var  areaList={
var areaList = {
  province_list: {
    110000: '北京市',
@@ -4216,16 +4221,16 @@
  return map.get(parseInt(value)) || "暂无"
}
const getDateDiff = function GetDateDiff(startDate,endDate = new Date().getTime()) {
const getDateDiff = function GetDateDiff(startDate, endDate = new Date().getTime()) {
  let time = endDate - startDate;
  console.log(time);
}
const farmatTimeJuli = function(endTime) {
const farmatTimeJuli = function (endTime) {
  let end = endTime.replaceAll("-", "/")
  var endTimeTeam = new Date(end).getTime();
  var nowTimeTeam = new Date().getTime();
  if(endTimeTeam - nowTimeTeam < 0) {
  if (endTimeTeam - nowTimeTeam < 0) {
    return false
  }
  let gutterTime = Number((endTimeTeam - nowTimeTeam) / 86400000);
@@ -4238,7 +4243,7 @@
  formatTime: formatTime,
  post,
  get,
  formatTimeUser:formatTimeUser,
  formatTimeUser: formatTimeUser,
  OBSupload,
  get7Days,
  timestampToTime,
@@ -4247,4 +4252,4 @@
  formatOrderType,
  getDateDiff,
  farmatTimeJuli
}
}