Browse Source

小程序:初始化项目

panyong 2 years ago
parent
commit
1b4e3847be

+ 1 - 1
htmldev/wxMini/app.json

@@ -41,4 +41,4 @@
       }
     ]
   }
-}
+}

+ 0 - 23
htmldev/wxMini/pages/home/api/index.js

@@ -1,23 +0,0 @@
-const { request } = require('../../../api/request')
-/**
- * 订单统计
- * @returns {Promise<*>}
- */
-export const fetchOrderCount = () => request({
-  url: '/api/user/order/count',
-  method: 'POST',
-  showLoading: false
-}, false)
-
-/**
- * 根据起始终点获取行程信息
- * @returns {Promise<*>}
- */
-export const fetchDistanceInfo = (formData) => request({
-  url: '/api/user/order/distance/info',
-  method: 'POST',
-  data: {
-    ...formData
-  },
-  showLoading: true
-}, true)

+ 19 - 879
htmldev/wxMini/pages/home/home.js

@@ -1,925 +1,65 @@
-const {
-  formatGlDate,
-  platform,
-  cutDownTime,
-  formatTs,
-  getDayList
-} = require('../../utils/util.js')
-const { postGeoCoder } = require('../../api/common')
-const { fetchOrderCount, fetchDistanceInfo } = require('./api/index')
-const { sessionStorageKey } = require('../../api/request')
-const { one, two, three } = formatGlDate()
-const app = getApp()
-
 Page({
 
   /**
    * 页面的初始数据
    */
   data: {
-    sessionId: '',
-    navBarHeight: app.globalData.navBarHeight,
-    navBarConfig: {
-      booFixed: true,
-      backgroundColor: '',
-      icon: 'home',
-      iconPath: '/common/nav_logo@2x.png',
-      label: '',
-      title: ''
-    },
-    introduceList: [
-      {
-        icon: '/home/Frame_291@2x.png',
-        name: '正规车辆'
-      },
-      {
-        icon: '/home/Home_icon_professional@2x.png',
-        name: '专业司机'
-      },
-      {
-        icon: '/home/Home_icon_standard@2x.png',
-        name: '标准定价'
-      },
-      {
-        icon: '/home/Home_icon_bus@2x.png',
-        name: '车型丰富'
-      }
-    ],
-    originLocation: {},
-    travelerPopup: false,
-    isAutoFocus: false,
-    form: {
-      'start_point': {
-        'longitude': 0, // 经度
-        'latitude': 0, // 纬度
-        'address_name': '', // 起点位置名称
-        'name': ''
-      }, // 起点
-      'end_point': {
-        'longitude': 0, // 经度
-        'latitude': 0, // 纬度
-        'address_name': '', // 起点位置名称
-        'name': ''
-      }, // 终点
-      'order_pass_location': [], // 途径地点
-      'order_user_num': '', // 乘车用户数量
-      'order_start_time': '', // 开始时间
-      'order_end_time': '无返程', // 返程时间
-      'order_car': [], // 从订单详情跳转至创建订单页使用参数:车辆信息
-      'order_car_action': '', // 车辆用途
-      'driver_cost': {}, // 司机费用
-      'order_remark': '', // 订单备注
-      'gaosu_distance': 0, // 出发的高速里程(米)
-      'order_time': 0, // 出发的耗时(分)
-      'order_distance': 0, // 出发的总里程(米)
-      'gaosu_distance_back': 0, // 返程的高速里程(米)
-      'order_time_back': 0, // 返程的耗时(分)
-      'order_distance_back': 0 // 返程的总里程(米)
-    },
-    booGoTimePicker: false,
-    multiIndexGoTimePicker: [0, 0, 0],
-    booBackTimePicker: false,
-    multiIndexBackTimePicker: [0, 0, 0],
-    booLock: false,
-    objOrderCount: {
-      // 'count': 0, // 订单数量
-      // 'id': '' // 订单ID(当数量为1时存在)
-    },
-    startColumns: [
-      {
-        values: [],
-        defaultIndex: 0
-      },
-      {
-        values: [],
-        defaultIndex: 0
-      },
-      {
-        values: [],
-        defaultIndex: 0
-      }
-    ],
-    endColumns: [
-      {
-        values: [],
-        defaultIndex: 0
-      },
-      {
-        values: [],
-        defaultIndex: 0
-      },
-      {
-        values: [],
-        defaultIndex: 0
-      }
-    ]
+    background: ['demo-text-1', 'demo-text-2', 'demo-text-3']
   },
-  tempFormKey: '', // 用于当前所在城市、选择出发、途径地、终点的字段名,默认为空:为空表示当前所在城市
-  tempPostData: {},
-  tempStartOptions: {},
-  tempEndOptions: {},
+
   /**
    * 生命周期函数--监听页面加载
    */
-  onLoad: async function (options) {
-    this.tempFormKey = ''
-    await this.setForm()
-    await this.getDistance()
-    // this.handleGetSetting()
-  },
-  bindCallBack() {
-    // this.handleGetSetting()
-    this.getOrderCount()
-    this.getDistance()
-  },
-  // 从订单详情页进入首页时
-  async init() {
-    await this.setForm()
-    await this.getDistance()
+  onLoad (options) {
+
   },
 
   /**
    * 生命周期函数--监听页面初次渲染完成
    */
-  onReady: function () {
+  onReady () {
 
   },
 
   /**
    * 生命周期函数--监听页面显示
    */
-  onShow: function () {
-    this.setData({
-      sessionId: wx.getStorageSync(sessionStorageKey)
-    })
-    this.getOrderCount()
+  onShow () {
+
   },
 
   /**
    * 生命周期函数--监听页面隐藏
    */
-  onHide: function () {
+  onHide () {
 
   },
 
   /**
    * 生命周期函数--监听页面卸载
    */
-  onUnload: function () {
+  onUnload () {
 
   },
 
   /**
-   * 用户点击右上角分享
+   * 页面相关事件处理函数--监听用户下拉动作
    */
-  onShareAppMessage: function () {
-    return {
-      title: '来吧上车,我们一起去看看',
-      path: '/pages/home/home',
-      imageUrl: 'https://bashi-1311374120.cos.ap-shanghai.myqcloud.com/wxMini/image/common/friend500x400.png'
-    }
-  },
-  onPageScroll({ scrollTop }) {
-    let backgroundColor = ''
-    if (Math.abs(scrollTop) >= Math.floor(this.data.navBarHeight / 2)) {
-      backgroundColor = 'rgba(106, 134, 177)'
-    }
-    if (backgroundColor === this.data.navBarConfig.backgroundColor) {
-      return
-    }
-    this.setData({
-      'navBarConfig.backgroundColor': backgroundColor
-    })
-  },
-  // 获取定位权限、定位权限授权
-  async handleGetSetting() {
-    const that = this
-
-    if (that.tempFormKey === '') {
-      // 清除缓存定位数据
-      wx.removeStorageSync(app.globalData.homeMyCityKeyOfStorage)
-    }
-
-    try {
-      const { errMsg, authSetting } = await wx.getSetting()
-      if (errMsg === 'getSetting:ok') {
-        // 有定位授权
-        if (authSetting['scope.userLocation']) {
-          if (that.tempFormKey === '') {
-
-          } else {
-            await that.chooseLocationBridge()
-          }
-          return
-        }
-      }
-    } catch (err) {}
-
-    try {
-      await wx.authorize({ scope: 'scope.userLocation' })
-      if (that.tempFormKey === '') {
-
-      } else {
-        await that.chooseLocationBridge()
-      }
-    } catch (err) {
-      wx.showModal({
-        title: '提示',
-        content: '未开启获取地理位置权限,去设置中打开',
-        success(res) {
-          if (res.confirm) {
-            that.openSetting()
-          }
-        }
-      })
-    }
-  },
-  // 去小程序自带设置页:返回
-  async openSetting() {
-    try {
-      const openSettingData = await wx.openSetting()
-      // 开启了定位权限
-      if (openSettingData.authSetting['scope.userLocation']) {
-        if (this.tempFormKey === '') {
-
-        } else {
-          await this.chooseLocationBridge()
-        }
-      }
-    } catch (err) {}
-  },
-  // 经纬度解析为地址
-  async getCity() {
-    const { latitude, longitude } = this.data.originLocation
-    let city = '定位失败'
-    try {
-      const { status, data } = await postGeoCoder(latitude, longitude)
-      if (status) {
-        const { address_component } = data
-        city = address_component.city
-      }
-    } catch (err) {}
-    this.setData({
-      'navBarConfig.label': city
-    })
-    wx.setStorage({
-      key: app.globalData.homeMyCityKeyOfStorage,
-      data: city
-    })
-  },
-  async handleChooseLocation(e) {
-    const { lat, lon, formkey } = e.currentTarget.dataset
-    this.tempPostData = lat && lon ? {
-      latitude: lat,
-      longitude: lon
-    } : {}
-    this.tempFormKey = /^order_pass_location/.test(formkey) ? 'form.order_pass_location[' +
-      formkey.split('-')[1] * 1 + ']' : 'form.' + formkey
-    await this.handleGetSetting()
-  },
-  async chooseLocationBridge() {
-    if (!this.tempFormKey) {
-      return
-    }
-    try {
-      const { errMsg, address, latitude, longitude, name } = await wx.chooseLocation(
-        this.tempPostData)
-      if (errMsg === 'chooseLocation:ok' && address && name) {
-        const pointInfo = {
-          address_name: address,
-          name,
-          latitude,
-          longitude
-        }
-        if (this.checkSimilarPoint(this.tempFormKey, pointInfo)) {
-          wx.showModal({
-            title: '提示',
-            content: '起点、途经点与终点不能相同~',
-            showCancel: false
-          })
-          return
-        }
-        this.setData({
-          [this.tempFormKey]: pointInfo
-        }, () => {
-          this.getDistance()
-        })
-      }
-    } catch (err) {
-      // 点击了取消按钮
-      if (err.errMsg === 'chooseLocation:fail cancel') {
-      }
-      // 未开启授权
-      if (err.errMsg === 'chooseLocation:fail auth deny') {
-      }
-    }
-  },
-  // 检查起点、途经点、终点是否相同了:判断依据相邻的2个点不同就可以了
-  checkSimilarPoint(formKey, value) {
-    const { start_point, order_pass_location, end_point } = this.data.form
-    let start = JSON.parse(JSON.stringify(start_point))
-    let passLocation = JSON.parse(JSON.stringify(order_pass_location))
-    let end = JSON.parse(JSON.stringify(end_point))
-    let arr = []
-    let isSimilar = false
-
-    if (formKey.indexOf('start_point') > -1) {
-      start = value
-    }
-    if (formKey.indexOf('end_point') > -1) {
-      end = value
-    }
-    // formKey:form.order_pass_location[0]
-    if (formKey.indexOf('order_pass_location') > -1) {
-      const index = formKey.replace(/.*\[|]$/g, '')
-      passLocation[index * 1] = value
-    }
-    arr = [].concat(start, ...passLocation, end)
-    arr = arr.filter(item => item.address_name)
-
-    if (arr.length > 1) {
-      for (let i = 1; i < arr.length; i++) {
-        if (arr[i].address_name === arr[i - 1].address_name) {
-          isSimilar = true
-          break
-        }
-      }
-    }
-
-    return isSimilar
-  },
-  addWay() {
-    let temp = JSON.parse(JSON.stringify(this.data.form.order_pass_location))
-    if (this.data.form.order_pass_location.length > 4) {
-      wx.showToast({
-        title: '最多可添加5个途经点',
-        icon: 'none'
-      })
-      return
-    }
-    temp.push({ address_name: '', name: '', latitude: 0, longitude: 0 })
-    this.setData({
-      'form.order_pass_location': temp
-    })
-  },
-  delWay(e) {
-    const { index } = e.currentTarget.dataset
-    let temp = JSON.parse(JSON.stringify(this.data.form.order_pass_location))
-    temp.splice(index, 1)
-    this.setData({
-      'form.order_pass_location': temp
-    })
-  },
-  async navBarEvent() {
-    wx.navigateTo({
-      url: '/pages/selectCity/selectCity'
-    })
-  },
-  onClose() {
-    this.setData({
-      travelerPopup: false
-    })
-  },
-  showTravelerPopup() {
-    this.setData({
-      travelerPopup: true
-    })
+  onPullDownRefresh () {
 
-    setTimeout(() => {
-      this.setData({
-        isAutoFocus: true
-      })
-    }, 500)
-  },
-  bindInput(e) {
-    return {
-      value: e.detail.value.replace(/[^\d$]/, '').replace(/^0/, '')
-    }
   },
-  initColumnData(pickerType, val0 = {}, val1 = {}) {
-    const date = new Date()
-    const curMS = date.getTime()
-    const minMS = curMS + 2 * 60 * 60 * 1000
-    // 每一天的23:50:00必须大于当前时间加2小时
-    const firstColumn = one.filter(item => {
-      const temp = platform().ios ? item._text.replace(/-/g, '/') : item._text
-
-      return new Date(`${temp} 23:50:00`).getTime() > minMS
-    })
-
-    if (pickerType === 'end_point') {
-      firstColumn.unshift({
-        value: '10',
-        text: '无返程',
-        _text: '无返程'
-      })
-    }
-    let YYYYIndex = firstColumn.findIndex(item => item.value === val0.value)
-    if (YYYYIndex === -1) {
-      YYYYIndex = 0
-    }
-
-    let YYYYMMDD = firstColumn[YYYYIndex]._text
-    if (/^\d{4}/.test(YYYYMMDD) && platform().ios) {
-      YYYYMMDD = YYYYMMDD.replace(/-/g, '/')
-    }
-
-    const secondColumn = /^\d{4}/.test(YYYYMMDD) ? two.filter(item => {
-      return new Date(`${YYYYMMDD} ${item._text}:50:00`).getTime() > minMS
-    }) : []
-
-    let HHIndex = secondColumn.findIndex(item => item.value === val1.value)
-    if (HHIndex === -1) {
-      HHIndex = 0
-    }
-
-    const thirdColumn = /^\d{4}/.test(YYYYMMDD) ? three.filter(item => {
-      const str = `${YYYYMMDD} ${secondColumn[HHIndex]._text}:${item._text}:00`
-      return new Date(str).getTime() > minMS
-    }) : []
-
-    return {
-      firstColumn,
-      secondColumn,
-      thirdColumn
-    }
-  },
-  setStartColumnsDefaultIndex(value) {
-    let startOptions = {}
-    let index0 = 0
-    let index1 = 0
-    let index2 = 0
-    if (Object.prototype.toString.call(value) === '[object Number]' && value > 0) {
-      const { YYYY, MM, DD, HH, mm } = formatTs(value)
-      const YYYYMMDD = `${YYYY}-${MM}-${DD}`
-      const val0 = one.filter(item => item._text === YYYYMMDD)
-      const val1 = two.filter(item => item._text === HH)
-      startOptions = this.initColumnData('start_point', val0[0], val1[0])
-      index0 = startOptions.firstColumn.findIndex(item => item._text === YYYYMMDD)
-      index1 = startOptions.secondColumn.findIndex(item => item._text === HH)
-      index2 = startOptions.thirdColumn.findIndex(item => item._text === mm)
-    } else {
-      startOptions = this.initColumnData('start_point')
-    }
-
-    if (index0 === -1) {
-      index0 = 0
-    }
-    if (index1 === -1) {
-      index1 = 0
-    }
-    if (index2 === -1) {
-      index2 = 0
-    }
 
-    this.tempStartOptions = {
-      firstColumn: startOptions.firstColumn,
-      secondColumn: startOptions.secondColumn,
-      thirdColumn: startOptions.thirdColumn
-    }
-    this.setData({
-      multiIndexGoTimePicker: [index0, index1, index2],
-      'startColumns[0].values': startOptions.firstColumn,
-      'startColumns[0].defaultIndex': index0,
-      'startColumns[1].values': startOptions.secondColumn,
-      'startColumns[1].defaultIndex': index1,
-      'startColumns[2].values': startOptions.thirdColumn,
-      'startColumns[2].defaultIndex': index2
-    }, () => {
-      const instance = this.selectComponent('#van-picker-start_time')
-      instance && instance.setIndexes && instance.setIndexes(this.data.multiIndexGoTimePicker)
-    })
-  },
-  setEndColumnsDefaultIndex(value) {
-    let endOptions = {}
-    let index0 = 0
-    let index1 = 0
-    let index2 = 0
-    if (Object.prototype.toString.call(value) === '[object Number]' && value > 0) {
-      const { YYYY, MM, DD, HH, mm } = formatTs(value)
-      const YYYYMMDD = `${YYYY}-${MM}-${DD}`
-      const val0 = one.filter(item => item._text === YYYYMMDD)
-      const val1 = two.filter(item => item._text === HH)
-      endOptions = this.initColumnData('end_point', val0[0], val1[0])
-      index0 = endOptions.firstColumn.findIndex(item => item._text === YYYYMMDD)
-      index1 = endOptions.secondColumn.findIndex(item => item._text === HH)
-      index2 = endOptions.thirdColumn.findIndex(item => item._text === mm)
-    } else {
-      endOptions = this.initColumnData('end_point')
-    }
-
-    if (index0 === -1) {
-      index0 = 0
-    }
-    if (index1 === -1) {
-      index1 = 0
-    }
-    if (index2 === -1) {
-      index2 = 0
-    }
-
-    this.tempEndOptions = {
-      firstColumn: endOptions.firstColumn,
-      secondColumn: endOptions.secondColumn,
-      thirdColumn: endOptions.thirdColumn
-    }
-    this.setData({
-      multiIndexBackTimePicker: [index0, index1, index2],
-      'endColumns[0].values': endOptions.firstColumn,
-      'endColumns[0].defaultIndex': index0,
-      'endColumns[1].values': endOptions.secondColumn,
-      'endColumns[1].defaultIndex': index1,
-      'endColumns[2].values': endOptions.thirdColumn,
-      'endColumns[2].defaultIndex': index2
-    }, () => {
-      const instance = this.selectComponent('#van-picker-back_time')
-      instance && instance.setIndexes && instance.setIndexes(this.data.multiIndexBackTimePicker)
-    })
-  },
-  showGoTimePicker() {
-    this.setData({ booGoTimePicker: true })
-  },
-  bindChangeGoTimePicker(e) {
-    const { picker, value, index } = e.detail
-    const options = this.initColumnData('start_point', value[0], value[1])
-    if (index === 0) {
-      picker.setColumnValues(1, options.secondColumn)
-      picker.setColumnValues(2, options.thirdColumn)
-    } else if (index === 1) {
-      picker.setColumnValues(2, options.thirdColumn)
-    } else {
-      picker.setColumnValues(2, options.thirdColumn)
-    }
-  },
-  getValueGoTimePicker() {
-    const instance = this.selectComponent('#van-picker-start_time')
-    const indexes = instance.getIndexes()
-    const values = instance.getValues()
-    const HH = values.length >= 2 ? values[1]._text : ''
-    const mm = values.length === 3 ? values[2]._text : ''
-    let YYYYMMDD = values.length >= 1 ? values[0]._text : ''
-
-    if (platform().ios) {
-      YYYYMMDD = YYYYMMDD.replace(/-/g, '/')
-    }
-
-    if (['02', '03', '04'].findIndex(item => item === HH) > -1 || (HH === '05' && mm === '00')) {
-      wx.showModal({
-        title: '提示',
-        content: '凌晨2点~5点高速不通行,请选择其它时间~',
-        showCancel: false
-      })
-      return
-    }
-
-    this.tempStartOptions = {
-      firstColumn: instance.getColumnValues(0),
-      secondColumn: instance.getColumnValues(1),
-      thirdColumn: instance.getColumnValues(2)
-    }
-    this.setData({
-      'form.order_start_time': new Date(`${YYYYMMDD} ${HH}:${mm}:00`).getTime(),
-      multiIndexGoTimePicker: indexes
-    }, () => {
-      this.onCloseGoTimePicker()
-    })
-
-  },
-  onCloseGoTimePicker() {
-    const startOptions = this.tempStartOptions
-    this.setData({
-      booGoTimePicker: false,
-      'startColumns[0].values': startOptions.firstColumn,
-      'startColumns[1].values': startOptions.secondColumn,
-      'startColumns[2].values': startOptions.thirdColumn
-    }, () => {
-      const instance = this.selectComponent('#van-picker-start_time')
-      instance.setIndexes(this.data.multiIndexGoTimePicker)
-    })
-  },
-  showBackTimePicker() {
-    if (!(this.data.form.start_point.address_name) || !(this.data.form.end_point.address_name)) {
-      wx.showToast({
-        title: '请选择出发地与目的地',
-        icon: 'none'
-      })
-      return
-    }
-
-    if (!(this.data.form.order_start_time)) {
-      wx.showToast({
-        title: '请选择出发时间',
-        icon: 'none'
-      })
-      return
-    }
-
-    this.setData({
-      booBackTimePicker: true
-    })
-  },
-  bindChangeBackTimePicker(e) {
-    const { picker, value, index } = e.detail
-    const options = this.initColumnData('end_point', value[0], value[1])
-    if (index === 0) {
-      picker.setColumnValues(1, options.secondColumn)
-      picker.setColumnValues(2, options.thirdColumn)
-    } else if (index === 1) {
-      picker.setColumnValues(2, options.thirdColumn)
-    } else {
-      picker.setColumnValues(2, options.thirdColumn)
-    }
-  },
-  getValueBackTimePicker() {
-    const orderStartTime = this.data.form.order_start_time
-    // 单程耗时
-    const orderDuration = this.data.form.order_time * 60 * 1000
-    const instance = this.selectComponent('#van-picker-back_time')
-    const indexes = instance.getIndexes()
-    const values = instance.getValues()
-    let YYYYMMDD = values.length >= 1 ? values[0]._text : ''
-    const HH = /^\d{4}/.test(YYYYMMDD) && values.length >= 2 ? values[1]._text : ''
-    const mm = /^\d{4}/.test(YYYYMMDD) && values.length === 3 ? values[2]._text : ''
-    let formTime = YYYYMMDD
-
-    if (orderDuration <= 0) {
-      wx.showToast({
-        title: '正在规划路线,请稍后选择返程时间~',
-        icon: 'none'
-      })
-      return
-    }
-
-    if (/^\d{4}/.test(YYYYMMDD) && platform().ios) {
-      YYYYMMDD = YYYYMMDD.replace(/-/g, '/')
-    }
-
-    if (['02', '03', '04'].findIndex(item => item === HH) > -1 || (HH === '05' && mm === '00')) {
-      wx.showModal({
-        title: '提示',
-        content: '凌晨2点~5点高速不通行,请选择其它时间~',
-        showCancel: false
-      })
-      return
-    }
-
-    if (/^\d{4}/.test(YYYYMMDD)) {
-      formTime = new Date(`${YYYYMMDD} ${HH}:${mm}:00`).getTime()
-      const dayList = getDayList(orderStartTime, orderDuration)
-      const endTs = dayList.length > 0 ? dayList[dayList.length - 1].endTs : orderStartTime
-      const duration = endTs - orderStartTime
-      if (formTime < endTs) {
-        wx.showModal({
-          title: '提示',
-          content: `当前时间可能无法返程:去程耗时约${cutDownTime(duration / 1000, 'hh:mm zh')}~`,
-          showCancel: false
-        })
-        return
-      }
-    }
-
-    this.tempEndOptions = {
-      firstColumn: instance.getColumnValues(0),
-      secondColumn: instance.getColumnValues(1),
-      thirdColumn: instance.getColumnValues(2)
-    }
-    this.setData({
-      'form.order_end_time': formTime,
-      multiIndexBackTimePicker: indexes
-    }, () => {
-      this.onCloseBackTimePicker()
-    })
-  },
-  onCloseBackTimePicker() {
-    const endOptions = this.tempEndOptions
-    this.setData({
-      booBackTimePicker: false,
-      'endColumns[0].values': endOptions.firstColumn,
-      'endColumns[1].values': endOptions.secondColumn,
-      'endColumns[2].values': endOptions.thirdColumn
-    }, () => {
-      const instance = this.selectComponent('#van-picker-back_time')
-      instance.setIndexes(this.data.multiIndexBackTimePicker)
-    })
-  },
-  bindSubmit(e) {
-    const {
-      number
-    } = e.detail.value
-    if (!number) {
-      wx.showToast({
-        title: '请输入乘车人数',
-        icon: 'none'
-      })
-      return
-    }
-    this.setData({
-      'form.order_user_num': number,
-      travelerPopup: false
-    })
-  },
-  async getDistance() {
-    const that = this
-    const { start_point, order_pass_location, end_point } = that.data.form
-    // 去除选择的同一个地点
-    const orderPassLocation = order_pass_location.filter(item => item.address_name)
-    const formData = {
-      start_point,
-      end_point,
-      order_pass_location: orderPassLocation
-    }
-    that.setData({
-      'form.gaosu_distance': 0,
-      'form.order_time': 0,
-      'form.order_distance': 0,
-      'form.gaosu_distance_back': 0,
-      'form.order_time_back': 0,
-      'form.order_distance_back': 0
-    })
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom () {
 
-    if (!start_point.address_name) {
-      return
-    }
-    if (!end_point.address_name) {
-      return
-    }
-    try {
-      const { status, data, msg } = await fetchDistanceInfo(formData)
-      if (status) {
-        const {
-          gaosu_distance,
-          order_time,
-          order_distance,
-          gaosu_distance_back,
-          order_time_back,
-          order_distance_back
-        } = data
-        that.setData({
-          'form.gaosu_distance': gaosu_distance,
-          'form.order_time': order_time,
-          'form.order_distance': order_distance,
-          'form.gaosu_distance_back': gaosu_distance_back,
-          'form.order_time_back': order_time_back,
-          'form.order_distance_back': order_distance_back
-        })
-      } else {
-        wx.showToast({
-          title: msg,
-          icon: 'none'
-        })
-      }
-    } catch (err) {}
   },
-  verify() {
-    const orderStartTime = this.data.form.order_start_time
-    const orderDuration = this.data.form.order_time * 60 * 1000
-    const dayList = getDayList(orderStartTime, orderDuration)
-    const endTs = dayList.length > 0 ? dayList[dayList.length - 1].endTs : orderStartTime
 
-    let errorList = []
-    if (!(this.data.form.start_point.address_name)) {
-      errorList.push({ errMsg: '请选择出发地' })
-    }
-    if (!(this.data.form.end_point.address_name)) {
-      errorList.push({ errMsg: '请选择目的地' })
-    }
-    if (this.data.form.order_distance <= 1 || this.data.form.order_time <= 1) {
-      errorList.push({ errMsg: '正在规划路线,请稍后点击下一步~' })
-    }
-    if (!(this.data.form.order_user_num)) {
-      errorList.push({ key: 'order_user_num' })
-    }
-    if (!orderStartTime) {
-      errorList.push({ key: 'order_start_time' })
-    }
-    // 返程时间限制:返程时间要大于单程到达时间
-    if (this.data.form.order_end_time !== '无返程' && this.data.form.order_end_time < endTs) {
-      errorList.push({ key: 'order_end_time' })
-    }
-    return errorList
-  },
-  async onsubmit() {
-    const verifyList = this.verify()
-    if (verifyList.length) {
-      const { errMsg, key } = verifyList[0]
-      if (errMsg) {
-        wx.showToast({
-          title: errMsg,
-          icon: 'none'
-        })
-      } else if (key) {
-        switch (key) {
-          case 'order_user_num':
-            this.showTravelerPopup()
-            break
-          case 'order_start_time':
-            this.showGoTimePicker()
-            break
-          case 'order_end_time':
-            this.showBackTimePicker()
-            break
-          default:
-        }
-      }
-      return
-    }
-    // 去除途径地未完善信息的
-    // 创建订单数据:存入本地
-    wx.setStorage({
-      key: app.globalData.homeCreateOrderKeyOfStorage,
-      data: JSON.stringify({
-        ...this.data.form,
-        'order_pass_location': this.data.form.order_pass_location.filter(item => item.address_name),
-        'order_start_time': Math.round(this.data.form.order_start_time / 1000), // 后端要求时间戳为秒
-        'order_end_time': this.data.form.order_end_time === '无返程' ? '' : Math.round(
-          this.data.form.order_end_time / 1000),
-        'is_return_back': this.data.form.order_end_time === '无返程' ? 0 : 1 // 是否返程(0否1是)
-      })
-    })
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage () {
 
-    wx.navigateTo({
-      url: !this.data.sessionId ? '/pages/login/login' : '/pages/createOrder/createOrder'
-    })
-  },
-  jumpInvoice() {
-    wx.navigateTo({
-      url: '/pages/invoice/invoice'
-    })
-  },
-  jumpHelp() {
-    wx.navigateTo({
-      url: '/pages/help/help'
-    })
-  },
-  jumpFeedback() {
-    wx.navigateTo({
-      url: '/pages/feedback/feedback'
-    })
-  },
-  // 设置form的初始值
-  async setForm() {
-    const date = new Date()
-    const curMS = date.getTime()
-    const minMS = curMS + 2 * 60 * 60 * 1000
-    const key = app.globalData.homeCreateOrderKeyOfStorage
-    try {
-      const { data, errMsg } = await wx.getStorage({ key })
-      if (errMsg === 'getStorage:ok' && /^{/.test(data)) {
-        const temp = JSON.parse(data)
-        for (let key in temp) {
-          let value = temp[key]
-          if (this.data.form.propertyIsEnumerable(key)) {
-            // 检查出发时间是否大于当前时间2小时
-            if (key === 'order_start_time') {
-              if (value && value * 1000 > minMS) {
-                value = value * 1000
-              } else {
-                value = ''
-              }
-            }
-            if (key === 'order_end_time') {
-              if (value && value * 1000 > minMS) {
-                value = value * 1000
-              } else {
-                value = '无返程'
-              }
-            }
-            this.setData({
-              ['form.' + key]: value
-            })
-          }
-        }
-      }
-    } catch (err) {}
-    const { order_start_time, order_end_time } = this.data.form
-    this.setStartColumnsDefaultIndex(order_start_time)
-    this.setEndColumnsDefaultIndex(order_end_time)
-  },
-  async getOrderCount() {
-    try {
-      const { status, data } = await fetchOrderCount()
-      if (status) {
-        this.setData({
-          objOrderCount: data
-        })
-      }
-    } catch (err) {}
-  },
-  jumpOrder() {
-    const { count, id } = this.data.objOrderCount
-    if (count === 1) {
-      wx.navigateTo({
-        url: '/pages/orderDetail/orderDetail?orderId=' + id
-      })
-      return
-    }
-    wx.navigateTo({
-      url: '/pages/order/order'
-    })
-  },
-  jumpCompany() {
-    wx.navigateTo({
-      url: '/pages/company/company'
-    })
   }
 })

+ 3 - 7
htmldev/wxMini/pages/home/home.json

@@ -1,10 +1,6 @@
 {
-  "usingComponents": {
-    "navigation-bar": "../../components/navigationBar/navigationBar",
-    "van-popup": "@vant/weapp/popup/index",
-    "van-picker": "@vant/weapp/picker/index"
-  },
-  "navigationStyle": "custom",
-  "navigationBarTextStyle": "white",
+  "usingComponents": {},
+  "navigationBarTitleText": "始宁农业",
+  "navigationBarBackgroundColor": "#CCCCCC",
   "backgroundColor": "#F6F6F6"
 }

+ 26 - 244
htmldev/wxMini/pages/home/home.wxml

@@ -1,252 +1,34 @@
-<view class="home-wrapper"
-      style="padding-top: {{navBarConfig.booFixed ? navBarHeight : 0}}px">
-  <!-- 顶部栏 -->
-  <navigation-bar
-    navBarConfig="{{navBarConfig}}"
-    bind:navBarEvent="navBarEvent"/>
-  <view class="introduce">
-    <view class="list"
-          wx:for="{{introduceList}}"
-          wx:key="index">
-      <image src="{{tools.imgFilter(item.icon)}}"></image>
-      <text>{{item.name}}</text>
+<view class="home-wrapper">
+  <view class="header">
+    <view class="header-search-warp">
+      <label for="header-search">
+        <image src=""></image>
+      </label>
+      <input
+        id="header-search"
+        placeholder-class="header-search-placeholder"
+        value=""
+        placeholder="搜索"></input>
+    </view>
+    <view class="leaving-a-message">
+      <image src=""></image>
+      <view>8</view>
     </view>
   </view>
-  <view class="main">
-    <view class="address start">
-      <text class="icon">起</text>
-      <view class="text-wrap {{ form.start_point.address_name ? 'has' : 'empty' }}"
-            data-formkey="start_point"
-            data-lat="{{form.start_point.latitude}}"
-            data-lon="{{form.start_point.longitude}}"
-            bind:tap="handleChooseLocation">
-        <text wx:if="{{!(form.start_point.address_name)}}">从哪里出发</text>
-        <block wx:else>
-          <text>{{form.start_point.name}}</text>
-          <text>{{form.start_point.address_name}}</text>
-        </block>
-      </view>
-    </view>
-    <block wx:if="{{form.order_pass_location.length}}">
-      <view class="address underway"
-            wx:for="{{form.order_pass_location}}"
-            wx:key="index">
-        <text class="icon">经</text>
-        <view class="text-wrap {{ item.address_name ? 'has' : 'empty' }}"
-              data-formkey="{{'order_pass_location-' + index}}"
-              data-lat="{{item.latitude}}"
-              data-lon="{{item.longitude}}"
-              bind:tap="handleChooseLocation">
-          <text wx:if="{{!(item.address_name)}}">输入途经点地址{{index + 1}}</text>
-          <block wx:else>
-            <text>{{item.name}}</text>
-            <text>{{item.address_name}}</text>
-          </block>
-          <view class="del-wrap"
-                catch:tap="delWay"
-                data-index="{{index}}">
-            <image class="del {{ item.address_name ? 'has' : 'empty' }}"
-                   src="{{tools.imgFilter('/home/Home_address_icon_delete@2x.png')}}"></image>
-          </view>
-        </view>
-      </view>
-    </block>
-    <view class="address end">
-      <text class="icon">终</text>
-      <view class="text-wrap {{ form.end_point.address_name ? 'has' : 'empty' }}"
-            data-formkey="end_point"
-            data-lat="{{form.end_point.latitude}}"
-            data-lon="{{form.end_point.longitude}}"
-            bind:tap="handleChooseLocation">
-        <text wx:if="{{!(form.end_point.address_name)}}">要到哪里去?</text>
-        <block wx:else>
-          <text>{{form.end_point.name}}</text>
-          <text>{{form.end_point.address_name}}</text>
-        </block>
-      </view>
-    </view>
-    <view class="btn-wrap">
-      <view class="number"
-            bind:tap="showTravelerPopup">
-        <text>{{form.order_user_num ? '乘客 ' + form.order_user_num + ' 人' : '输入乘车人数'}}</text>
-        <image src="{{tools.imgFilter('/common/Home_people_icon_arrow@2x.png')}}"></image>
-      </view>
-      <view class="add" bind:tap="addWay">
-        <image src="{{tools.imgFilter('/home/Home_via_icon_add@2x.png')}}"></image>
-        <text>添加途经地</text>
-      </view>
-    </view>
-  </view>
-  <view class="main">
-    <view class="time">
-      <view class="label">
-        <image class="icon"
-               src="{{tools.imgFilter('/home/Home_time_icon_start@2x.png')}}"></image>
-        <text>出发时间</text>
-      </view>
-      <view class="text-wrap {{ form.order_start_time ? 'has' : 'empty' }}" bind:tap="showGoTimePicker">
-        <text wx:if="{{!(form.order_start_time)}}">请选择出发时间</text>
-        <block wx:else>
-          <text>{{tools.formatTs(form.order_start_time, 'YYYY.MM.DD hh:mm week')}}</text>
-        </block>
-        <image class="arrow"
-               src="{{tools.imgFilter('/common/Home_time_icon_arrow@2x.png')}}"></image>
-      </view>
-    </view>
-    <view class="time">
-      <view class="label">
-        <image class="icon"
-               src="{{tools.imgFilter('/home/Home_time_icon_back@2x.png')}}"></image>
-        <text>返程时间</text>
-      </view>
-      <view class="text-wrap {{ form.order_end_time ? 'has' : 'empty' }}" bind:tap="showBackTimePicker">
-        <text wx:if="{{!(form.order_end_time)}}">请选择返程时间</text>
-        <block wx:else>
-          <text wx:if="{{form.order_end_time === '无返程'}}">无返程</text>
-          <text wx:else>{{tools.formatTs(form.order_end_time, 'YYYY.MM.DD hh:mm week')}}</text>
-        </block>
-        <image class="arrow"
-               src="{{tools.imgFilter('/common/Home_time_icon_arrow@2x.png')}}"></image>
-      </view>
-    </view>
-    <button class="next"
-            type="primary"
-            disabled="{{booLock}}"
-            bind:tap="onsubmit">下一步
-    </button>
-  </view>
-  <view class="footer {{objOrderCount.count >= 1 ? 'padding-bottom-134' : 'padding-bottom-26'}}">
-    <swiper class="home-swiper"
-            indicator-color="rgba(255,255,255,1)"
-            indicator-active-color="#FFFFFF9B"
-            indicator-dots="{{false}}"
-            autoplay="{{false}}"
-            interval="{{2000}}"
-            duration="{{500}}">
-      <block wx:for="{{['demo-text-1', 'demo-text-2', 'demo-text-3']}}"
-             wx:key="*this">
+
+  <view class="page-section page-section-spacing swiper">
+    <swiper
+      indicator-dots="{{true}}"
+      indicator-color="rgba(151, 209, 79, 1)"
+      indicator-active-color="#FFF"
+      autoplay="{{false}}">
+      <block
+        wx:for="{{background}}"
+        wx:key="*this">
         <swiper-item>
-          <view class="swiper-item" bind:tap="jumpCompany">
-            <image src="{{tools.imgFilter('/home/banner.png?v=202207132134')}}"></image>
-          </view>
+          <view class="swiper-item {{item}}">{{item}}</view>
         </swiper-item>
       </block>
     </swiper>
-    <view class="tools">
-      <view class="title">
-        <image src="{{tools.imgFilter('/home/Home_Zone_icon_zone@2x.png')}}"></image>
-        <text>功能专区</text>
-      </view>
-      <image class="customer-services"
-             src="{{tools.imgFilter('/home/Home_Zone_banner_service@2x.png')}}"
-             bind:tap="jumpHelp"></image>
-      <view class="wrap">
-        <view bind:tap="jumpInvoice">
-          <image class="icon" src="{{tools.imgFilter('/home/Home_Zone_icon_invoice@2x.png')}}"></image>
-          <text>开具发票</text>
-        </view>
-        <view bind:tap="jumpFeedback">
-          <image class="icon" src="{{tools.imgFilter('/home/Home_Zone_icon_opinion@2x.png')}}"></image>
-          <text>意见反馈</text>
-        </view>
-      </view>
-    </view>
   </view>
 </view>
-  <!--  有未结束的订单时,首页底部有浮层提示,订单包括:待支付、待接单、待安排车辆、待出发、行驶中、已完成-->
-  <!--  当只有1个订单时,点击浮层直接进入该订单详情;当有2个(含)以上时,点击浮层进入“我的订单”列表页-->
-<view
-  class="jump-order"
-  wx:if="{{objOrderCount.count >= 1}}"
-  bind:tap="jumpOrder">
-  <!-- 悬浮按钮 -->
-  <image class="icon-0"
-         src="{{tools.imgFilter('/home/Home_remind_icon_indent@2x.png')}}"></image>
-  <text>您有{{objOrderCount.count}}笔订单进行中</text>
-  <image class="icon-1"
-         src="{{tools.imgFilter('/common/Home_remind_icon_arrow@2x.png')}}"></image>
-</view>
-  <!-- 弹窗:乘车人数 -->
-<van-popup
-  custom-class="customer-van-popup customer-van-popup_traveler"
-  show="{{travelerPopup}}"
-  close-on-click-overlay="{{false}}"
-  round
-  position="bottom"
-  bind:close="onClose">
-  <view style="left:0;top:0;"
-        class="close-icon"
-        bind:tap="onClose">
-    <image class="image" src="{{tools.imgFilter('/common/Popup_bus_icon_close@2x.png')}}"></image>
-  </view>
-  <view class="title">乘车人数</view>
-  <form bindsubmit="bindSubmit">
-    <view class="form-item">
-      <input value="{{form.order_user_num}}"
-             name="number"
-             type="number"
-             focus="{{isAutoFocus}}"
-             placeholder="请输入乘车人数"
-             placeholder-class="placeholder"
-             cursor-spacing="{{52}}"
-             bindinput="bindInput"></input>
-    </view>
-    <button type="primary"
-            hover-class="none"
-            form-type="submit">确定
-    </button>
-  </form>
-</van-popup>
-
-  <!-- 时间选择器:请选择出发时间 -->
-<van-popup
-  custom-class="customer-van-popup"
-  show="{{ booGoTimePicker }}"
-  round
-  position="bottom"
-  bind:close="onCloseGoTimePicker">
-  <view style="right:0;top:0;"
-        class="close-icon"
-        bind:tap="onCloseGoTimePicker">
-    <image class="image" src="{{tools.imgFilter('/common/Popup_bus_icon_close@2x.png')}}"></image>
-  </view>
-  <view class="title">请选择出发时间</view>
-  <view>
-    <van-picker
-      id="van-picker-start_time"
-      columns="{{ startColumns }}"
-      bind:change="bindChangeGoTimePicker"/>
-  </view>
-  <button class="customer-picker_footer"
-          hover-class="none"
-          type="primary"
-          bind:tap="getValueGoTimePicker">确定
-  </button>
-</van-popup>
-
-  <!-- 时间选择器:请选择返程时间 -->
-<van-popup
-  custom-class="customer-van-popup"
-  show="{{ booBackTimePicker }}"
-  round
-  position="bottom"
-  bind:close="onCloseBackTimePicker">
-  <view style="right:0;top:0;"
-        class="close-icon"
-        bind:tap="onCloseBackTimePicker">
-    <image class="image" src="{{tools.imgFilter('/common/Popup_bus_icon_close@2x.png')}}"></image>
-  </view>
-  <view class="title">请选择返程时间</view>
-  <view>
-    <van-picker
-      id="van-picker-back_time"
-      columns="{{ endColumns }}"
-      bind:change="bindChangeBackTimePicker"/>
-  </view>
-  <button class="customer-picker_footer"
-          hover-class="none"
-          type="primary"
-          bind:tap="getValueBackTimePicker">确定
-  </button>
-</van-popup>
-<wxs src="../../components/wxs/index.wxs" module="tools"></wxs>

+ 48 - 421
htmldev/wxMini/pages/home/home.wxss

@@ -1,460 +1,87 @@
-page {
-  background-color: #F6F6F6;
-}
-
 .home-wrapper {
-  position: relative;
-  left: 0;
-  top: 0;
-  width: 100%;
-}
-
-.home-wrapper:before {
-  content: '';
-  position: absolute;
-  left: 0;
-  top: 0;
-  right: 0;
-  height: 730rpx;
-  background: linear-gradient(180deg, rgba(65, 106, 165, 1) 0%, rgba(246, 246, 246, 1) 100%);
-}
-
-.introduce {
-  position: relative;
-  left: 0;
-  top: 0;
-  z-index: 1;
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  width: 718rpx;
-  padding: 0 16rpx 12rpx;
-  margin: 24rpx auto 0;
-}
-
-.introduce .list {
-  display: flex;
-  align-items: center;
-}
-
-.introduce .list image {
-  width: 32rpx;
-  height: 32rpx;
-}
-
-.introduce .list text {
-  margin-left: 8rpx;
-  color: rgba(255, 255, 255, 1);
-  font-size: 24rpx;
-  font-weight: 500;
-
-  line-height: 30rpx;
+  padding-top: 20rpx;
+  background: #FFF;
 }
 
-.main {
-  position: relative;
-  left: 0;
-  top: 0;
-  z-index: 1;
+.header {
   display: flex;
-  flex-direction: column;
   align-items: center;
-  width: 718rpx;
-  border-radius: 24rpx;
-  margin: 20rpx auto 0;
-  background: rgba(255, 255, 255, 1);
-}
-
-.main .address.start {
-  margin-top: 40rpx;
+  justify-content: center;
 }
 
-.main .address {
+.header-search-warp {
   display: flex;
   align-items: center;
-  width: 654rpx;
-  margin-top: 24rpx;
-}
-
-.main .address.start .icon,
-.main .address.underway .icon,
-.main .address.end .icon {
-  width: 32rpx;
-  height: 32rpx;
-  border-radius: 16rpx;
-  font-size: 20rpx;
-  font-weight: 500;
-  line-height: 32rpx;
-  text-align: center;
-  color: rgba(255, 255, 255, 1);
-}
+  width: 640rpx;
+  height: 68rpx;
+  border-radius: 40rpx;
+  background: #F6F7FAFF;
 
-.main .address.start .icon {
-  background: rgba(51, 51, 51, 1);
 }
 
-.main .address.underway .icon {
-  background: #CCCCCC;
+.header-search-warp label {
+  width: 66rpx;
 }
 
-.main .address.end .icon {
-  background: #FD6600;
-}
-
-.main .address .text-wrap {
-  position: relative;
-  left: 0;
-  top: 0;
-  display: flex;
-  flex-direction: column;
-  justify-content: center;
-  width: 598rpx;
-  min-height: 104rpx;
-  padding: 12rpx 16rpx;
-  margin-left: 24rpx;
-}
-
-.main .address .text-wrap.empty {
-  border-radius: 16rpx;
-  background: rgba(244, 244, 244, 1);
-}
-
-.main .address .text-wrap.empty text {
-  color: rgba(153, 153, 153, 1);
-  font-size: 30rpx;
-  font-weight: 500;
-  line-height: 36rpx;
-}
-
-.main .address .text-wrap text {
-  white-space: nowrap;
-  overflow: hidden;
-  text-overflow: ellipsis;
-}
-
-.main .address .text-wrap.has text:nth-of-type(1) {
-  padding-right: 104rpx;
-  color: rgba(0, 0, 0, 1);
-  font-size: 32rpx;
-  font-weight: 500;
-  line-height: 40rpx;
-}
-
-.main .address .text-wrap.has text:nth-of-type(2) {
-  padding-right: 104rpx;
-  margin-top: 8rpx;
-  color: rgba(138, 149, 176, 1);
-  font-size: 26rpx;
-  line-height: 32rpx;
-}
-
-.main .address .del-wrap {
-  position: absolute;
-  right: 0;
-  top: 0;
-  z-index: 1;
-  padding: 36rpx 32rpx;
-}
-
-.main .address .del {
+.header-search-warp image {
   display: block;
-  width: 32rpx;
-  height: 32rpx;
+  width: 29rpx;
+  height: 29rpx;
+  background: pink;
 }
 
-.main .address .empty {
-  right: 32rpx;
+.header-search-warp input {
+  width: calc(100% - 66rpx);
+  font-size: 28rpx;
+  color: #1F1F39FF;
 }
 
-.main .address .has {
-  right: 0;
+.header-search-placeholder {
+  color: rgba(190, 192, 202, 1);
 }
 
-.main .btn-wrap {
+.leaving-a-message {
   position: relative;
   left: 0;
   top: 0;
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  width: 654rpx;
-  padding: 24rpx 0;
-  margin-top: 24rpx;
-}
-
-.main .btn-wrap:before {
-  position: absolute;
-  left: 8rpx;
-  top: 0;
-  right: 8rpx;
-  content: '';
-  border-top: 1rpx solid #EEEEEE;
-}
-
-.main .btn-wrap view {
-  display: flex;
-  align-items: center;
-  min-width: 170rpx;
-  height: 64rpx;
-  padding: 0 12rpx;
-  border-radius: 12rpx;
-  border: 1rpx solid #E9E9E9;
-}
-
-.main .btn-wrap .number image,
-.main .btn-wrap .add text {
-  margin-left: 8rpx;
 }
 
-.main .btn-wrap text {
-  color: rgba(51, 51, 51, 1);
-  font-size: 24rpx;
-  font-weight: 500;
-  line-height: 30rpx;
-}
-
-.main .btn-wrap image {
-  width: 20rpx;
-  height: 20rpx;
-}
-
-.main .time {
-  display: flex;
-  align-items: center;
-  width: 654rpx;
-  height: 128rpx;
-  border-bottom: 1rpx solid #EEEEEE;
-}
-
-.main .time .label {
-  display: flex;
-  align-items: center;
-  width: 194rpx;
-}
-
-.main .time .label .icon {
-  width: 48rpx;
-  height: 48rpx;
-}
-
-.main .time .label text {
-  margin-left: 16rpx;
-  color: rgba(51, 51, 51, 1);
-  font-size: 28rpx;
-  font-weight: 500;
-  line-height: 34rpx;
-}
-
-.main .time .text-wrap {
-  display: flex;
-  justify-content: flex-end;
-  align-items: center;
-  width: calc(100% - 194rpx);
-}
-
-.main .time .text-wrap text {
-  font-size: 28rpx;
-  line-height: 34px;
-}
-
-.main .time .text-wrap.empty text {
-  color: rgba(153, 153, 153, 1);
-}
-
-.main .time .text-wrap.has text {
-  color: rgba(51, 51, 51, 1);
-}
-
-.main .time .arrow {
-  width: 28rpx;
-  height: 28rpx;
-  margin-left: 16rpx;
-}
-
-.main button.next[type='primary'] {
-  width: 654rpx;
-  height: 104rpx;
-  border-radius: 24rpx;
-  background-color: rgba(253, 102, 0, 1);
-  margin: 24rpx auto 32rpx;
-  color: rgba(255, 255, 255, 1);
-  font-size: 32rpx;
-  font-weight: 500;
-}
-
-.footer {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  width: 718rpx;
-  padding-top: 20rpx;
-  margin: 0 auto;
-}
-
-.footer.padding-bottom-26 {
-  padding-bottom: 26rpx;
-}
-
-.footer.padding-bottom-134 {
-  padding-bottom: 134rpx;
-}
-
-.home-swiper,
-.tools {
-  width: 349rpx;
-  height: 394rpx;
-  overflow: hidden;
-}
-
-.home-swiper .swiper-item {
-  width: 100%;
-  height: 100%;
-  border-radius: 24rpx;
-  overflow: hidden;
-}
-
-.home-swiper .swiper-item image {
-  display: block;
-  width: 100%;
-  height: 100%;
-}
-
-.tools {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  padding-top: 39rpx;
-  border-radius: 24rpx;
-  background: #FFFFFF;
-}
-
-.tools .title {
-  display: flex;
-  align-items: center;
-  width: 301rpx;
-}
-
-.tools .title image {
-  width: 32rpx;
-  height: 32rpx;
-}
-
-.tools .title text {
-  margin-left: 8rpx;
-  color: rgba(51, 51, 51, 1);
-  font-size: 28rpx;
-  font-weight: 500;
-  line-height: 34rpx;
-}
-
-.tools .customer-services {
+.leaving-a-message image {
   display: block;
-  width: 301rpx;
-  height: 134rpx;
-  margin-top: 17rpx;
+  width: 40rpx;
+  height: 50rpx;
+  background: pink;
 }
 
-.tools .wrap {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  width: 301rpx;
-  padding: 0 24rpx;
-  margin-top: 16rpx;
-}
-
-.tools .wrap view {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-}
-
-.tools .wrap .icon {
-  display: block;
-  width: 80rpx;
-  height: 80rpx;
-}
-
-.tools .wrap text {
-  display: block;
-  margin-top: 8rpx;
-  color: rgba(51, 51, 51, 1);
+.leaving-a-message view {
+  position: absolute;
+  top: -9rpx;
+  right: -9rpx;
+  z-index: 1;
+  min-width: 36rpx;
+  min-height: 36rpx;
+  border-radius: 18rpx;
+  background: #FA5151FF;
   font-size: 24rpx;
-  line-height: 30rpx;
-}
-
-.jump-order {
-  position: fixed;
-  left: 50%;
-  bottom: 24rpx;
-  z-index: 99;
-  display: flex;
-  align-items: center;
-  min-width: 371rpx;
-  height: 82rpx;
-  padding: 0 32rpx;
-  border-radius: 82rpx;
-  border: 3rpx solid #FFFFFF;
-  background: linear-gradient(180deg, rgba(77, 121, 183, 1) 0%, rgba(134, 171, 222, 1) 100%);
-  box-shadow: 0 13rpx 26rpx 0 rgba(147, 168, 197, 0.36);
-  transform: translateX(-50%);
-}
-
-.jump-order .icon-0 {
-  width: 48rpx;
-  height: 48rpx;
-}
-
-.jump-order .icon-1 {
-  width: 28rpx;
-  height: 28rpx;
-}
-
-.jump-order text {
-  margin: 0 8rpx 0 0;
-  color: rgba(255, 255, 255, 1);
-  font-size: 28rpx;
   font-weight: 500;
-  line-height: 34rpx;
-  white-space: nowrap;
-}
-
-.customer-van-popup_traveler form {
-  display: block;
-  width: 100%;
-  padding-bottom: 60rpx;
+  color: #FFF;
+  line-height: 36rpx;
+  text-align: center;
 }
 
-.customer-van-popup_traveler .form-item {
+.page-section {
   width: 690rpx;
-  height: 104rpx;
-  margin: 0 auto;
-  border-radius: 16rpx;
-  background: rgba(248, 248, 248, 1);
+  height: 270rpx;
+  margin: 22rpx auto 10rpx;
 }
 
-.customer-van-popup_traveler .form-item input {
-  display: block;
-  height: 100%;
-  font-size: 34rpx;
-  color: #333333;
-  opacity: 1;
-  background: transparent;
-  text-align: center;
+.page-section swiper-item {
+  background: pink;
+  border-radius: 20rpx;
 }
 
-.placeholder {
-  font-size: 34rpx;
-  color: #999999;
-}
-
-.customer-van-popup_traveler button[type='primary'] {
-  position: absolute;
-  right: 0;
-  top: 0;
-  z-index: 1;
-  padding: 46rpx 24rpx;
-  font-size: 30rpx;
-  color: #FD6600;
-  background-color: transparent;
+.wx-swiper-dot {
+  width: 34px !important;
+  height: 6px;
+  border-radius: 0 !important;
 }