13404089107
2025-02-14 ec43e87c75ac193eaf9b5cdac6f272b27efa24b1
咸宁上架及维护
9个文件已修改
379 ■■■■ 已修改文件
app.js 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/carDown/carDown.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/getLocation/getLocation.js 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.js 285 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/myTrip/myTrip.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/waiting/waiting.js 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
project.config.json 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
project.private.config.json 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/ajax.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app.js
@@ -3,9 +3,9 @@
// 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 = 'http://221.182.45.100:7777/user'
@@ -33,11 +33,11 @@
     initSocket() {
      let that = this;
      that.globalData.localSocket = wx.connectSocket({
        // url: "ws://192.168.110.34:7777/websocket",
        url: "ws://221.182.45.100:9978",
        url: "ws://192.168.110.34:9978",
        // url: "ws://221.182.45.100:9978",
        // url: "ws://221.182.45.100:900",
        // url: "wss://xn95128.cn/websocket",
        url: "wss://xn95128.cn:9978",
      });
      console.log('shuju//////////////////',this.globalData.localSocket);
@@ -471,11 +471,11 @@
    userLatitude:wx.getStorageSync('latitude')||'',
    userLongitude:wx.getStorageSync('longitude')||'',
    // Url:'http://192.168.110.34:7777/user',
    Url:'http://221.182.45.100: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() {},
pages/carDown/carDown.js
@@ -37,7 +37,7 @@
    showPop:false,
    couponId:"",
    payStyle: [
      { name: "充值余额", checked: false ,money:'0元'},
      // { name: "充值余额", checked: false ,money:'0元'},
      { name: "微信支付", checked: true },
  ],
@@ -198,7 +198,7 @@
          // let newmoney = res.data.data.balance
          this.setData({
           queryBalance:res.data.data,
           [money]:newmoney
          //  [money]:newmoney
          })
       }else{
         app.showToastSuccess(res.data.msg,null,"none",1500)
pages/getLocation/getLocation.js
@@ -172,17 +172,23 @@
    let lat = self.location.lat
    let lng = self.location.lng
    let data = this.data
    wx.request({
      url: `https://api.map.baidu.com/geoconv/v2/?coords=${lng},${lat}&model=5&ak=3mHKIXMArjgIkgADzOlTYp4XssNSNkwr`,
      success: (resp) => {
    prevPage.setData({
      startLat: lat,
      startLon: lng,
          startLat: resp.data.result[0].y,
          startLon: resp.data.result[0].x,
      cityNameStart: self.name,
      changeStartName: self.name,
      showFrist: false,
      formLocation: false
    })
      }
    })
    if (this.data.where !== "advoad") {
      if (this.data.where == "") {
        console.log("11", lat, lng)
        console.log("11000000000000000000", lat, lng)
        prevPage.getLocal(lat, lng)
      }
      prevPage.openCity(self.adcode)
@@ -292,6 +298,7 @@
    let index = e.currentTarget.dataset.index
    var historyStart = wx.getStorageSync('historyStart')
    let data = this.data
    if (data.advoadLocation) {
      if (data.advoadLocation == 'startLocation') {
        this.advoadLocationAddress('startLocation', self)
@@ -333,6 +340,13 @@
    let prevPage = pages[pages.length - 2];
    let lat = self.location.lat
    let lng = self.location.lng
    wx.request({
      url: `https://api.map.baidu.com/geoconv/v2/?coords=${lng},${lat}&model=5&ak=3mHKIXMArjgIkgADzOlTYp4XssNSNkwr`,
      success: (resp) => {
        lat =resp.data.result[0].y
        lng =resp.data.result[0].x
      }
    })
    prevPage.setData({
      startLat: lat,
      startLon: lng,
@@ -341,6 +355,7 @@
      showFrist: false,
      formLocation: false
    })
    console.log('22222222222222',this.data);
    if (this.data.where !== "advoad") {
      if (this.data.where == "") {
        console.log("11")
@@ -348,8 +363,8 @@
      }
      prevPage.openCity(self.adcode)
      console.log("1")
      wx.setStorageSync('latitude', lat)
      wx.setStorageSync('longitude', lng)
      // wx.setStorageSync('latitude', lat)
      // wx.setStorageSync('longitude', lng)
      wx.navigateBack({
        delta: 1
      });
pages/home/home.js
@@ -456,6 +456,7 @@
            longitude: this.transformFromGCJToBaidu(res.latitude, res.longitude).longitude,
          })
          that.getLocal(res.latitude, res.longitude)
          console.log('2222222222222222222222222222222222');
          that.getCarNum(res.latitude, res.longitude, that.data.busId)
        }
      })
@@ -790,7 +791,8 @@
    mapCtx.moveToLocation({
      success: (res) => {
        console.log('adsadsad', res);
        this.getLocal(wx.getStorageSync('latitude'), wx.getStorageSync('longitude'))
        // this.getLocal(wx.getStorageSync('latitude'), wx.getStorageSync('longitude'),true)
        this.getLocationApi()
        this.setData({
          newCityName: "",
@@ -1377,6 +1379,7 @@
                            // longitude: res.originalData.result.location.lng,
                            adcode: res.originalData.result.addressComponent.adcode,
                            cityNameStart: res.originalData.result.formatted_address,
                            changeStartName:res.originalData.result.formatted_address,
                            district: res.originalData.result.addressComponent.district,
                            province: res.originalData.result.addressComponent.province,
                            formatted_address: res.originalData.result.formatted_address
@@ -2170,7 +2173,7 @@
            latitude: res.latitude,
            longitude: res.longitude,
          })
          that.getLocal(res.latitude, res.longitude)
          that.getLocal(res.latitude, res.longitude, true)
          that.getCarNum(res.latitude, res.longitude, that.data.busId)
        }
      })
@@ -2186,27 +2189,33 @@
    }
  },
  // 获取当前地理位置
  getLocal: function (latitude, longitude) {
  getLocal: function (latitude, longitude, move) {
    var bmap = new BaiduMap.BMapWX({
      ak: 'fi3HGJjW153NCNsaTb9FekxeX1Lj3auo' // 必填,您的key
    })
    let that = this;
    wx.request({
      url: `https://api.map.baidu.com/geoconv/v2/?coords=${longitude},${latitude}&model=1&ak=3mHKIXMArjgIkgADzOlTYp4XssNSNkwr`,
      success: (res) => {
      url: `https://api.map.baidu.com/geoconv/v2/?coords=${longitude},${latitude}&model=5&ak=3mHKIXMArjgIkgADzOlTYp4XssNSNkwr`,
      success: (resp) => {
        console.log('获取当前地理位置 获取当前地理位置', resp, 'longitude', longitude, 'latitude', latitude, 'move move move', move)
        bmap.regeocoding({
          location: res.data.result[0].y + ',' + res.data.result[0].x,
          success: function (res) {
          location:move?(latitude+ ',' +longitude):(resp.data.result[0].y + ',' + resp.data.result[0].x),
          // location:latitude+ ',' +longitude,
          // location: '30.657469'+','+'104.06669',
          success:  (res)=> {
            //这里的res参数里有具体的城市数据
            console.log('这里的res参数里有具体的城市数据', res)
            var name = res.originalData.result.addressComponent
            that.setData({
              changeStartName: res.originalData.result.formatted_address,
              startLat: '',
              startLon: '',
              startLat: move?'':resp.data.result[0].y,
              startLon: move?'':resp.data.result[0].x,
              cityNameStart: res.originalData.result.formatted_address,
              adcode: res.originalData.result.addressComponent.adcode,
              latitude,
              longitude
              latitude:move?latitude:resp.data.result[0].y,
              longitude:move?longitude:resp.data.result[0].x
              // latitude:'30.657469',
              // longitude:"104.06669"
            })
            that.queryBusiness(name.city, name.district, name.province)
            that.openCity(res.originalData.result.addressComponent.adcode)
@@ -2254,28 +2263,208 @@
      let startLon = that.data.startLon || that.data.longitude
      wx.request({
        url: `https://api.map.baidu.com/geoconv/v2/?coords=${startLon},${startLat};${that.data.nextLongitude},${that.data.nextLatitude}&model=1&ak=3mHKIXMArjgIkgADzOlTYp4XssNSNkwr`,
        success: (res) => {
        success: (resp) => {
          console.log('that.data.nextLongitud,that.data.nextLongitudee', that.data.nextLongitude)
          // wx.request({
          //   url: `https://api.map.baidu.com/directionlite/v1/driving?origin=${resp.data.result[0].y},${resp.data.result[0].x}&destination=${that.data.nextLatitude},${that.data.nextLongitude}&ak=WQhfsluNzEeUHUxoH4jc4JiCQOXw4Mnx&ret_coordtype=gcj02`,
          //   success: (res) => {
          //     var coors = res.data.result.routes[0].steps
          //     var polyline = [];
          //     coors.forEach(function (step, index) {
          //       // if (index == 0) {
          //       //   polyline.push({
          //       //     latitude: step.end_location.lat,
          //       //     longitude: step.end_location.lng
          //       //   });
          //       // } else {
          //       //   polyline.push({
          //       //     latitude: step.start_location.lat,
          //       //     longitude: step.start_location.lng
          //       //   });
          //       // }
          //       // return
          //       let list = step.path.split(';')
          //       if (index == 0) {
          //         polyline.push({
          //           latitude: step.start_location.lat,
          //           longitude: step.start_location.lng
          //         });
          //       }
          //       list.forEach(function (item, ind) {
          //         if (item) {
          //           let lng = item.split(',')[0]
          //           let lat = item.split(',')[1]
          //           polyline.push({
          //             latitude: lat,
          //             longitude: lng
          //           });
          //         }
          //       })
          //       // }
          //       if (coors.length == index + 1) {
          //         unit.post(app.globalData.Url + '/base/taxi/queryExpectedTime', {
          //             // slat:that.data.latitude,
          //             // slon:that.data.longitude,
          //             slat: that.data.startLat || that.data.latitude,
          //             slon: that.data.startLon || that.data.longitude,
          //             elat: that.data.nextLatitude,
          //             elon: that.data.nextLongitude
          //           })
          //           .then((res) => {
          //             if (res.data.code == 200) {
          //               // let markers1 = that.data.markers[0]
          //               // let markers2 =
          //               //   that.data.markers[1]+ that.data.markers[1][callout]
          //               // this.setData({
          //               // markers:[markers1,markers2]
          //               // })
          //               console.log(list, '2222222222222222222222');
          //               var markers = [{
          //                   iconPath: "../../img/start_icon.png",
          //                   id: 1,
          //                   latitude: that.data.startLat || that.data.latitude,
          //                   longitude: that.data.startLon || that.data.longitude,
          //                   width: 26,
          //                   height: 34,
          //                 },
          //                 {
          //                   iconPath: "../../img/end_icon.png",
          //                   id: 2,
          //                   latitude: list[list.length - 2].split(',')[1],
          //                   longitude: list[list.length - 2].split(',')[0],
          //                   width: 26,
          //                   height: 34,
          //                   callout: {
          //                     content: '大约行驶' + res.data.data.minute + '分钟',
          //                     color: '#333333',
          //                     fontSize: 13,
          //                     borderRadius: 1,
          //                     display: 'ALWAYS',
          //                     borderRadius: 13,
          //                     padding: 10,
          //                     textAlign: 'center'
          //                   }
          //                 },
          //               ]
          //               that.setData({
          //                 markers,
          //                 points
          //               })
          //             }
          //           })
          //       }
          //     });
          //     that.setData({
          //       polyline: [{
          //         points: polyline,
          //         arrowLine: true,
          //         color: '#00C47A',
          //         width: 4,
          //         borderWidth: 1,
          //         borderColor: '#00C47A'
          //       }],
          //     });
          //   }
          // })
          // return
          unit.post(app.globalData.Url + '/base/loadLine', {
              startLat: res.data.result[0].y,
              startLon: res.data.result[0].x,
              nextLatitude: res.data.result[1]?.y,
              nextLongitude: res.data.result[1]?.x,
              startLat: resp.data.result[0].y,
              startLon: resp.data.result[0].x,
              nextLatitude: that.data.nextLatitude,
              nextLongitude: that.data.nextLongitude,
            })
            .then((res) => {
              var coors = res.data.data
              var polyline = [];
              coors.forEach(function (step, index) {
                // if (index == 0) {
                //   polyline.push({
                //     latitude: step.end_location.lat,
                //     longitude: step.end_location.lng
                //   });
                // } else {
                //   polyline.push({
                //     latitude: step.start_location.lat,
                //     longitude: step.start_location.lng
                //   });
                // }
                // return
                let list = step.path.split(';')
                if (index == 0) {
                  polyline.push({
                    latitude: step.start_location.lat,
                    longitude: step.start_location.lng
                  });
                } else {
                  polyline.push({
                    latitude: step.end_location.lat,
                    longitude: step.end_location.lng
                  });
                }
                list.forEach(function (item, ind) {
                  if (item) {
                    let lng = item.split(',')[0]
                    let lat = item.split(',')[1]
                    polyline.push({
                      latitude: lat,
                      longitude: lng
                    });
                    if (coors.length == index + 1 && list.length==ind+1) {
                      unit.post(app.globalData.Url + '/base/taxi/queryExpectedTime', {
                          // slat:that.data.latitude,
                          // slon:that.data.longitude,
                          slat: that.data.startLat || that.data.latitude,
                          slon: that.data.startLon || that.data.longitude,
                          elat: that.data.nextLatitude,
                          elon: that.data.nextLongitude
                        })
                        .then((res) => {
                          if (res.data.code == 200) {
                            // let markers1 = that.data.markers[0]
                            // let markers2 =
                            //   that.data.markers[1]+ that.data.markers[1][callout]
                            // this.setData({
                            // markers:[markers1,markers2]
                            // })
                            console.log(list, '2222222222222222222222');
                            var markers = [{
                                iconPath: "../../img/start_icon.png",
                                id: 1,
                                latitude: that.data.startLat || that.data.latitude,
                                longitude: that.data.startLon || that.data.longitude,
                                width: 26,
                                height: 34,
                              },
                              {
                                iconPath: "../../img/end_icon.png",
                                id: 2,
                                latitude: lat,
                                longitude: lng,
                                width: 26,
                                height: 34,
                                callout: {
                                  content: '大约行驶' + res.data.data.minute + '分钟',
                                  color: '#333333',
                                  fontSize: 13,
                                  borderRadius: 1,
                                  display: 'ALWAYS',
                                  borderRadius: 13,
                                  padding: 10,
                                  textAlign: 'center'
                                }
                              },
                            ]
                            that.setData({
                              markers,
                              points
                            })
                          }
                        })
                    }
                  }
                })
                // }
              });
              that.setData({
@@ -2327,10 +2516,6 @@
      //       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`,
      //   success: function (res) {
@@ -2342,57 +2527,7 @@
      //     app.showToastSuccess('路线规划失败', null, "none", 1500)
      //   }
      // })
      unit.post(app.globalData.Url + '/base/taxi/queryExpectedTime', {
          // slat:that.data.latitude,
          // slon:that.data.longitude,
          slat: that.data.startLat || that.data.latitude,
          slon: that.data.startLon || that.data.longitude,
          elat: that.data.nextLatitude,
          elon: that.data.nextLongitude
        })
        .then((res) => {
          if (res.data.code == 200) {
            // let markers1 = that.data.markers[0]
            // let markers2 =
            //   that.data.markers[1]+ that.data.markers[1][callout]
            // this.setData({
            // markers:[markers1,markers2]
            // })
            var markers = [{
                iconPath: "../../img/start_icon.png",
                id: 1,
                latitude: that.data.startLat || that.data.latitude,
                longitude: that.data.startLon || that.data.longitude,
                width: 26,
                height: 34,
              },
              {
                iconPath: "../../img/end_icon.png",
                id: 2,
                latitude: that.data.nextLatitude,
                longitude: that.data.nextLongitude,
                width: 26,
                height: 34,
                callout: {
                  content: '大约行驶' + res.data.data.minute + '分钟',
                  color: '#333333',
                  fontSize: 13,
                  borderRadius: 1,
                  display: 'ALWAYS',
                  borderRadius: 13,
                  padding: 10,
                  textAlign: 'center'
                }
              },
            ]
            that.setData({
              markers,
              points
            })
          }
        })
      //  var polyline =[{  
pages/myTrip/myTrip.js
@@ -22,7 +22,8 @@
    pageNum: 1,
    Data: [],
    showPayVan: false, //支付弹窗
    payStyle: [{
    payStyle: [
      {
        name: "充值余额",
        checked: false,
        money: '0元'
pages/waiting/waiting.js
@@ -63,11 +63,12 @@
    couponId: '',
    isIncok: false,
    showIpay: false,
    payStyle: [{
        name: "充值余额",
        checked: false,
        money: '0元'
      },
    payStyle: [
      // {
      //   name: "充值余额",
      //   checked: false,
      //   money: '0元'
      // },
      {
        name: "微信支付",
        checked: true
@@ -1590,7 +1591,7 @@
          let newmoney = "(" + res.data.data.balance + '可用' + ")"
          this.setData({
            queryBalance: res.data.data,
            [money]: newmoney
            // [money]: newmoney //不要余额支付
          })
        } else {
project.config.json
@@ -1,11 +1,5 @@
{
  "appid": "wx4d36488fa2cd2718",
  "compileType": "miniprogram",
  "libVersion": "3.7.2",
  "packOptions": {
    "ignore": [],
    "include": []
  },
  "setting": {
    "coverView": true,
    "es6": true,
@@ -19,11 +13,18 @@
      "disablePlugins": [],
      "outputPath": ""
    },
    "condition": false
    "condition": false,
    "ignoreUploadUnusedFiles": true
  },
  "condition": {},
  "editorSetting": {
    "tabIndent": "insertSpaces",
    "tabSize": 2
  }
  },
  "libVersion": "3.7.2",
  "packOptions": {
    "ignore": [],
    "include": []
  },
  "appid": "wx4d36488fa2cd2718"
}
project.private.config.json
@@ -21,6 +21,20 @@
          "query": "",
          "launchMode": "default",
          "scene": null
        },
        {
          "name": "",
          "pathName": "pages/waiting/waiting",
          "query": "startAddress=%E5%9B%9B%E5%B7%9D%E7%9C%81%E6%88%90%E9%83%BD%E5%B8%82%E6%AD%A6%E4%BE%AF%E5%8C%BA%E6%AD%A6%E4%BE%AF%E7%A5%A0%E5%A4%A7%E8%A1%97264&startLat=30.64242&startLon=104.04311&endAddress=%E5%A4%A9%E5%BA%9C%E6%96%B0%E8%B0%B7-10%E5%8F%B7%E6%A5%BC&endLat=30.58595808489&endLon=104.05665899626&time=2025-02-05%2014%3A57%3A26&orderType=2&onekey=0",
          "launchMode": "default",
          "scene": null
        },
        {
          "name": "",
          "pathName": "pages/carDown/carDown",
          "query": "id=4338&orderType=2&onekey=0",
          "launchMode": "default",
          "scene": null
        }
      ]
    }
utils/ajax.js
@@ -92,11 +92,11 @@
const ajax = new Ajax({
  //  baseURL: 'http://192.168.0.49:81/api',
  // baseURL:"http://192.168.110.34:7777/user"
  baseURL:"http://221.182.45.100: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',
  
})