Browse Source

第一次提交

hjs 1 year ago
commit
377601c611
100 changed files with 9296 additions and 0 deletions
  1. 22 0
      .mini-ide/compileMode.json
  2. 5 0
      .mini-ide/project-ide.json
  3. 3 0
      __antmove/README.MD
  4. 8 0
      __antmove/api/config.js
  5. 1 0
      __antmove/api/desc.js
  6. 3 0
      __antmove/api/index.js
  7. 201 0
      __antmove/api/log.js
  8. 1478 0
      __antmove/api/my.js
  9. 15 0
      __antmove/api/propsPolyfill.js
  10. 2212 0
      __antmove/api/relations.js
  11. 143 0
      __antmove/api/runtimeProcess.js
  12. 827 0
      __antmove/api/utils.js
  13. 129 0
      __antmove/component/btn/btn.acss
  14. 9 0
      __antmove/component/btn/btn.axml
  15. 314 0
      __antmove/component/btn/btn.js
  16. 3 0
      __antmove/component/btn/btn.json
  17. 104 0
      __antmove/component/classSubdirectory/app.js
  18. 411 0
      __antmove/component/classSubdirectory/component.js
  19. 156 0
      __antmove/component/classSubdirectory/page.js
  20. 39 0
      __antmove/component/classSubdirectory/processRelation.js
  21. 40 0
      __antmove/component/classSubdirectory/promise.js
  22. 127 0
      __antmove/component/classSubdirectory/relation.js
  23. 84 0
      __antmove/component/classSubdirectory/selectComponent.js
  24. 94 0
      __antmove/component/classSubdirectory/utils.js
  25. 30 0
      __antmove/component/componentClass.js
  26. 9 0
      __antmove/component/custom-checkbox/custom-checkbox.acss
  27. 13 0
      __antmove/component/custom-checkbox/custom-checkbox.axml
  28. 13 0
      __antmove/component/custom-checkbox/custom-checkbox.js
  29. 3 0
      __antmove/component/custom-checkbox/custom-checkbox.json
  30. 3 0
      __antmove/component/custom-input/custom-input.acss
  31. 25 0
      __antmove/component/custom-input/custom-input.axml
  32. 61 0
      __antmove/component/custom-input/custom-input.js
  33. 3 0
      __antmove/component/custom-input/custom-input.json
  34. 10 0
      __antmove/component/custom-label/custom-label.acss
  35. 6 0
      __antmove/component/custom-label/custom-label.axml
  36. 17 0
      __antmove/component/custom-label/custom-label.js
  37. 3 0
      __antmove/component/custom-label/custom-label.json
  38. 4 0
      __antmove/component/custom-swiper-item/custom-swiper-item.acss
  39. 12 0
      __antmove/component/custom-swiper-item/custom-swiper-item.axml
  40. 24 0
      __antmove/component/custom-swiper-item/custom-swiper-item.js
  41. 3 0
      __antmove/component/custom-swiper-item/custom-swiper-item.json
  42. 12 0
      __antmove/component/custom-swiper/custom-swiper.acss
  43. 25 0
      __antmove/component/custom-swiper/custom-swiper.axml
  44. 52 0
      __antmove/component/custom-swiper/custom-swiper.js
  45. 3 0
      __antmove/component/custom-swiper/custom-swiper.json
  46. 16 0
      __antmove/component/lifeCyclesMap.js
  47. 91 0
      __antmove/component/utils/_relationNode.js
  48. 182 0
      __antmove/component/utils/cloneDeep.js
  49. 15 0
      __antmove/component/utils/collectObserver.js
  50. 41 0
      __antmove/component/utils/collectObservers.js
  51. 11 0
      __antmove/component/utils/compatibleLifetime.js
  52. 66 0
      __antmove/component/utils/findRelationNode.js
  53. 16 0
      __antmove/component/utils/getUrl.js
  54. 14 0
      __antmove/component/utils/handleAfterInit.js
  55. 24 0
      __antmove/component/utils/handleExternalClasses.js
  56. 42 0
      __antmove/component/utils/handleProps.js
  57. 39 0
      __antmove/component/utils/index.js
  58. 21 0
      __antmove/component/utils/mergeOptions.js
  59. 5 0
      __antmove/component/utils/nextUid.js
  60. 96 0
      __antmove/component/utils/observerHandle.js
  61. 34 0
      __antmove/component/utils/processDataSet.js
  62. 16 0
      __antmove/component/utils/processRelationPath.js
  63. 52 0
      __antmove/component/utils/processTriggerEvent.js
  64. 24 0
      __antmove/component/utils/updateData.js
  65. 69 0
      __antmove/component/utils/watchShakes.js
  66. 270 0
      __antmove/static/app.acss
  67. 8 0
      app.acss
  68. 53 0
      app.js
  69. 85 0
      app.json
  70. 56 0
      components/addCarNumber/index.acss
  71. 61 0
      components/addCarNumber/index.axml
  72. 146 0
      components/addCarNumber/index.js
  73. 4 0
      components/addCarNumber/index.json
  74. 40 0
      components/area-picker/index.acss
  75. 8 0
      components/area-picker/index.axml
  76. 158 0
      components/area-picker/index.js
  77. 4 0
      components/area-picker/index.json
  78. 85 0
      components/auth-popup/auth-popup.acss
  79. 31 0
      components/auth-popup/auth-popup.axml
  80. 38 0
      components/auth-popup/auth-popup.js
  81. 8 0
      components/auth-popup/auth-popup.json
  82. 55 0
      components/auth_self/auth_self.acss
  83. 11 0
      components/auth_self/auth_self.axml
  84. 46 0
      components/auth_self/auth_self.js
  85. 8 0
      components/auth_self/auth_self.json
  86. 40 0
      components/autoAdd/index.acss
  87. 38 0
      components/autoAdd/index.axml
  88. 91 0
      components/autoAdd/index.js
  89. 8 0
      components/autoAdd/index.json
  90. BIN
      components/catchFace/image/shelter.png
  91. BIN
      components/catchFace/image/shelter_fake.png
  92. 42 0
      components/catchFace/index.acss
  93. 16 0
      components/catchFace/index.axml
  94. 181 0
      components/catchFace/index.js
  95. 4 0
      components/catchFace/index.json
  96. 21 0
      components/catchFace/util/throttle.js
  97. 10 0
      components/custom-checkbox/custom-checkbox.acss
  98. 3 0
      components/custom-checkbox/custom-checkbox.axml
  99. 30 0
      components/custom-checkbox/custom-checkbox.js
  100. 4 0
      components/custom-checkbox/custom-checkbox.json

+ 22 - 0
.mini-ide/compileMode.json

@@ -0,0 +1,22 @@
+{
+  "modes": [
+    {
+      "title": "pages/resitor_scence/resitor_scence",
+      "page": "pages/visitor_make/visitor_make",
+      "pageQuery": "",
+      "query": "userVisitorDetailId=442"
+    },
+    {
+      "title": "pages/authorize_three/authorize_three",
+      "page": "pages/authorize_three/authorize_three",
+      "pageQuery": "",
+      "query": "name=航汇&token=e9e2faf62fdd538e27ad3eaf30f7ef48d00a2fc3&taskId=123344444455555555"
+    },
+    {
+      "title": "pages/auth_self/auth_self",
+      "page": "pages/visitor_qrcode/visitor_qrcode",
+      "launchMode": "common",
+      "pageQuery": ""
+    }
+  ]
+}

+ 5 - 0
.mini-ide/project-ide.json

@@ -0,0 +1,5 @@
+{
+  "ignoreHttpDomainCheck": true,
+  "disableSimulatorPermissionCheck": true,
+  "ignoreWebViewDomainCheck": true
+}

+ 3 - 0
__antmove/README.MD

@@ -0,0 +1,3 @@
+### __antmove 的用途
+
+__antmove 是Antmove编译之后在输出路径生成的运行时文件夹,它的作用就是抹平编译转换难以抹平的差异。包括  './api' 目录下对API的封装, ' ./component' 目录对框架能力、自定义组件的处理等。该目录请勿删除及修改

+ 8 - 0
__antmove/api/config.js

@@ -0,0 +1,8 @@
+
+    
+    module.exports = {
+        env: "development",
+        global: my,
+        useRuntimeLog: false
+    }
+    

File diff suppressed because it is too large
+ 1 - 0
__antmove/api/desc.js


+ 3 - 0
__antmove/api/index.js

@@ -0,0 +1,3 @@
+const runtimeProcess = require('./runtimeProcess.js')
+
+module.exports = runtimeProcess

+ 201 - 0
__antmove/api/log.js

@@ -0,0 +1,201 @@
+const config = require('./config.js')
+
+const env = config.env === 'production' ? 'prod' : 'dev' // prod, 生产环境不输出
+const oldUrl = []
+let flag = false
+module.exports = {
+  info() {},
+  // 生命周期报错警告记录函数
+
+  /**
+     * msg 为发出的警告信息
+     * lifeName 为发出警告的生命周期名字
+     * **/
+  warnLife(msg, lifeName) {
+    if (env === 'prod') { return false }
+    let _flag = true
+    const rs = my.getStorageSync({ key: '_pageMsg' })
+    if (lifeName === 'app/onHide') {
+      flag = true
+      return
+    }
+    if (flag) {
+      for (let i = 0; i < oldUrl.length; i++) {
+        if (oldUrl[i] === rs.data.pagePath) {
+          _flag = false
+          break
+        }
+      }
+    }
+    if (!_flag) {
+      return
+    } else {
+      oldUrl.push(rs.data.pagePath)
+    }
+    let logInfo = {
+      appName: '',
+      appVersion: '',
+      pages: [],
+    }
+    const page = {
+      pageName: '',
+      path: '',
+      open: false,
+      logs: [],
+    }
+    const log = {
+      type: '',
+      errorType: '',
+      name: '',
+      message: '',
+      custom: '',
+    }
+    let p = false
+    let l = false
+    let a = -1
+
+    const res = my.getStorageSync({ key: '__antmove_loginfo' })
+    if (res.data !== null) {
+      logInfo = res.data
+    }
+
+    page.pageName = rs.data.pageName
+    page.path = rs.data.pagePath
+    log.type = 'life'
+    log.name = lifeName
+    log.message = msg
+
+    if (res.data !== null) {
+      for (let i = 0; i < res.data.pages.length; i++) {
+        if (rs.data.pagePath === res.data.pages[i].path) {
+          p = true
+          a = i
+          for (let j = 0; j < res.data.pages[i].logs.length; j++) {
+            if (lifeName === res.data.pages[i].logs[j].name) {
+              l = true
+              if (l) { break }
+            }
+          }
+        }
+      }
+      if (p && !l) {
+        logInfo.pages[a].logs.push(log)
+      }
+      if (!p && !l) {
+        page.logs.push(log)
+        logInfo.pages.push(page)
+      }
+    } else {
+      page.logs.push(log)
+      logInfo.pages.push(page)
+    }
+    my.setStorageSync({
+      key: '__antmove_loginfo',
+      data: logInfo,
+    })
+    console.warn(msg)
+  },
+
+  /**
+    *  warn 为api报警的就函数
+    *  _desc = {
+    *      apiName: 报警的api的名字
+    *      errorType: 报警的api警告等级
+    *      type: 警告描述
+    * }
+    *  errorType等级分为:
+    *  0 - missing - 不支持该属性
+    *  1 - diff - 命名及格式不同
+    *  3 - diffType - 类型不同
+    *  4 - defaultValue - 默认值不同
+    * 5 - wrapComponent - 使用自定义组件代替
+    * 6 - diff tagName
+    * 7 - equal - 完全支持
+    */
+  warn(
+    msg,
+    _desc = {
+      apiName: '',
+      errorType: '',
+      type: '',
+    },
+  ) {
+    if (env === 'prod') { return false }
+
+    let logInfo = {
+      appName: '',
+      appVersion: '',
+      pages: [],
+    }
+    const page = {
+      pageName: '',
+      path: '',
+      open: '',
+      logs: [],
+    }
+    const log = {
+      type: '',
+      errorType: '',
+      name: '',
+      message: '',
+      custom: '',
+    }
+    const res = my.getStorageSync({ key: '__antmove_loginfo' })
+    if (res.data !== null) {
+      logInfo = res.data
+    }
+
+    const rs = my.getStorageSync({ key: '_pageMsg' })
+    if (!rs || !rs.data) { return }
+    page.pageName = rs.data.pageName
+    page.path = rs.data.pagePath
+    log.type = _desc.type
+    log.name = _desc.apiName
+    log.message = msg
+    log.errorType = _desc.errorType
+    if (!_desc.errorType && _desc.errorType !== 0) {
+      log.custom = 'No missing attribute'
+    } else if (_desc.errorType === 0) {
+      log.custom = '不支持该属性'
+    } else if (_desc.errorType === 1) {
+      log.custom = '命名及格式不同'
+    } else if (_desc.errorType === 2) {
+      log.custom = '类型不同'
+    } else if (_desc.errorType === 3) {
+      log.custom = '默认值不同'
+    }
+    let p = false
+    let l = false
+    let a = -1
+    if (res.data !== null) {
+      for (let i = 0; i < res.data.pages.length; i++) {
+        if (rs.data.pagePath === res.data.pages[i].path) {
+          p = true
+          a = i
+          for (let j = 0; j < res.data.pages[i].logs.length; j++) {
+            if (_desc.apiName === res.data.pages[i].logs[j].name) {
+              l = true
+              if (l) { break }
+            }
+          }
+        }
+      }
+      if (p && !l) {
+        logInfo.pages[a].logs.push(log)
+      }
+      if (!p && !l) {
+        page.logs.push(log)
+        logInfo.pages.push(page)
+      }
+    } else {
+      page.logs.push(log)
+      logInfo.pages.push(page)
+    }
+    my.setStorageSync({
+      key: '__antmove_loginfo',
+      data: logInfo,
+    })
+    console.warn(msg)
+  },
+  error() {},
+}

+ 1478 - 0
__antmove/api/my.js

@@ -0,0 +1,1478 @@
+const utils = require("./utils");
+const propsPolyfill = require("./propsPolyfill");
+const descObj = require("./desc.js");
+const apiObj = {startBeaconDiscovery:{fn: function fn(obj = {}) {
+      const startBeaconDiscoveryParams = descObj.startBeaconDiscovery.body.params.props
+      const params = utils.defineGetter(obj, startBeaconDiscoveryParams, (_obj, prop) => {
+        utils.warn(
+          `startBeaconDiscovery的参数不支持 ${prop} 属性!`,
+          {
+            apiName: `startBeaconDiscovery/${prop}`,
+            errorType: startBeaconDiscoveryParams[prop].type,
+            type: 'api',
+          },
+        )
+      })
+      return my.startBeaconDiscovery(params)
+    },},stopBeaconDiscovery:{fn: function fn(obj = {}) {
+      my.stopBeaconDiscovery(obj)
+    },},onBeaconUpdate:{fn: function fn(cb) {
+      return my.onBeaconUpdate({
+        success: cb,
+        fail: cb,
+      })
+    },},onBeaconServiceChange:{fn: function fn(cb) {
+      return my.onBeaconServiceChange({
+        success: cb,
+        fail: cb,
+        complete: cb,
+      })
+    },},getBeacons:{fn: function fn(obj = {}) {
+      return my.getBeacons(obj)
+    },},writeBLECharacteristicValue:{fn: function fn(obj = {}) {
+      if (obj.value) {
+        obj.value = utils.ab2hex(obj.value)
+      }
+      my.writeBLECharacteristicValue(obj)
+    },},createBLEConnection:{fn: function fn(obj = {}) {
+      return my.connectBLEDevice(obj)
+    },},closeBLEConnection:{fn: function fn(obj = {}) {
+      return my.disconnectBLEDevice(obj)
+    },},onBLEConnectionStateChange:{fn: function fn(obj = {}) {
+      return my.onBLEConnectionStateChanged(obj)
+    },},onBLECharacteristicValueChange:{fn: function fn(cb) {
+      my.onBLECharacteristicValueChange((res) => {
+        res.value = utils.changeType(res.value)
+        cb && cb(res)
+      })
+    },},getBLEDeviceServices:{fn: function fn(obj = {}) {
+      my.getBLEDeviceServices({
+        ...obj,
+        success: (res) => {
+          if (res.services) {
+            res.services.forEach((item) => {
+              item.uuid = item.serviceId
+              delete item.serviceId
+            })
+          }
+          obj.success && obj.success(res)
+        },
+      })
+    },},getBLEDeviceCharacteristics:{fn: function fn(obj = {}) {
+      my.getBLEDeviceCharacteristics({
+        ...obj,
+        success: (res) => {
+          if (res.characteristics) {
+            res.characteristics.forEach((item) => {
+              item.uuid = item.characteristicId
+              delete item.characteristicId
+            })
+          }
+          obj.success && obj.success(res)
+        },
+      })
+    },},addPhoneContact:{fn: function fn(obj = {}) {
+      if (obj.weChatNumber) {
+        obj.alipayAccount = obj.weChatNumber
+      }
+      my.addPhoneContact(obj)
+    },},startBluetoothDevicesDiscovery:{fn: function fn(obj = {}) {
+      if (obj.interval) {
+        obj.interval = Math.round(obj.interval)
+      }
+      my.startBluetoothDevicesDiscovery(obj)
+    },},onBluetoothDeviceFound:{fn: function fn(cb) {
+      const onBluetoothDeviceFoundProps = descObj.onBluetoothDeviceFound.body.returnValue.props
+      my.onBluetoothDeviceFound((res) => {
+        const arr = res.devices.map((item) => {
+          item.advertisData = utils.changeType(item.advertisData)
+          return utils.defineGetter(item, onBluetoothDeviceFoundProps, (obj, prop) => {
+            utils.warn(
+              `onBluetoothDeviceFound的返回值不支持 ${prop} 属性!`,
+              {
+                apiName: `onBluetoothDeviceFound/${prop}`,
+                errorType: onBluetoothDeviceFoundProps[prop].type,
+                type: 'api',
+              },
+            )
+          })
+        })
+        res.devices = arr
+        cb && cb(res)
+      })
+    },},getBluetoothDevices:{fn: function fn(obj = {}) {
+      const getBluetoothDevicesProps = descObj.getBluetoothDevices.body.returnValue.props.devices.props
+      my.getBluetoothDevices({
+        ...obj,
+        success: (res) => {
+          const arr = res.devices.map((item) => {
+            item.advertisData = utils.changeType(item.advertisData)
+            return utils.defineGetter(item, getBluetoothDevicesProps, (_obj, prop) => {
+              utils.warn(
+                `getBluetoothDevices的返回值不支持 ${prop} 属性!`,
+                {
+                  apiName: `getBluetoothDevices/${prop}`,
+                  errorType: getBluetoothDevicesProps[prop].type,
+                  type: 'api',
+                },
+              )
+            })
+          })
+          res.devices = arr
+          obj.success && obj.success(res)
+        },
+      })
+    },},setClipboardData:{fn: function fn(obj = {}) {
+      if (obj.data) {
+        obj.text = obj.data
+        delete obj.data
+      }
+      my.setClipboard(obj)
+    },},getClipboardData:{fn: function fn(obj = {}) {
+      my.getClipboard({
+        ...obj,
+        success: (res) => {
+          res.data = res.text
+          delete res.text
+          obj.success && obj.success(res)
+        },
+      })
+    },},onNetworkStatusChange:{fn: function fn(cb) {
+      my.onNetworkStatusChange((res) => {
+        res.networkType = res.networkType.toLowerCase()
+        const typeObjMap = {
+          unknown: 'unknown',
+          wifi: 'wifi',
+          '2g': '2g',
+          '3g': '3g',
+          '4g': '4g',
+        }
+                    
+        if (res && !res.isConnected) {
+          res.networkType = 'none'
+        } else {
+          res.networkType = typeObjMap[res.networkType] || res.networkType
+        }
+        cb && cb(res)
+      })
+    },},setScreenBrightness:{fn: function fn(obj = {}) {
+      if (obj.value) {
+        obj.brightness = obj.value
+        delete obj.value
+      }
+      my.setScreenBrightness(obj)
+    },},getScreenBrightness:{fn: function fn(obj = {}) {
+      my.getScreenBrightness({
+        success: (res) => {
+          res.value = res.brightness
+          delete res.brightness
+          obj.success && obj.success(res)
+        },
+        fail: (res) => {
+          obj.fail && obj.fail(res)
+        },
+      })
+    },},scanCode:{fn: function fn(obj = {}) {
+      obj.hideAlbum = obj.onlyFromCamera || false
+      my.scan(obj)
+    },},stopGyroscope:{fn: function fn(obj = {}) {
+      const stopGyroscopeParams = descObj.stopGyroscope.body.params.props
+      const params = utils.defineGetter(obj, stopGyroscopeParams, (_obj, prop) => {
+        utils.warn(
+          `stopGyroscope的参数不支持 ${prop} 属性!`,
+          {
+            apiName: `stopGyroscope${prop}`,
+            errorType: stopGyroscopeParams[prop].type,
+            type: 'api',
+          },
+        )
+      })
+      return my.offGyroscopeChange(params)
+    },},onCompassChange:{fn: function fn(cb) {
+      const onCompassChangeReturnValue = descObj.onCompassChange.body.returnValue.props
+      my.onCompassChange((res) => {
+        const _res = utils.defineGetter(res, onCompassChangeReturnValue, (obj, prop) => {
+          utils.warn(
+            `onCompassChange的返回值不支持 ${prop} 属性!`,
+            {
+              apiName: `onCompassChange/${prop}`,
+              errorType: onCompassChangeReturnValue[prop].type,
+              type: 'api',
+            },
+          )
+        })
+        cb && cb(_res)
+      })
+    },},stopCompass:{fn: function fn(obj = {}) {
+      const stopCompassParams = descObj.stopCompass.body.params.props
+      const params = utils.defineGetter(obj, stopCompassParams, (_obj, prop) => {
+        utils.warn(
+          `stopCompass的参数不支持 ${prop} 属性!`,
+          {
+            apiName: `stopCompass/${prop}`,
+            errorType: stopCompassParams[prop].type,
+            type: 'api',
+          },
+        )
+      })
+      return my.offCompassChange(params)
+    },},stopAccelerometer:{fn: function fn(obj = {}) {
+      const stopAccelerometerParams = descObj.stopAccelerometer.body.params.props
+      const params = utils.defineGetter(obj, stopAccelerometerParams, (_obj, prop) => {
+        utils.warn(
+          `stopAccelerometer的参数不支持 ${prop} 属性!`,
+          {
+            apiName: `stopCompass/${prop}`,
+            errorType: stopAccelerometerParams[prop].type,
+            type: 'api',
+          },
+        )
+      })
+      return my.offAccelerometerChange(params)
+    },},makePhoneCall:{fn: function fn(obj = {}) {
+      const makePhoneCallParams = descObj.makePhoneCall.body.params.props
+      if (obj.phoneNumber) {
+        obj.number = obj.phoneNumber
+        delete obj.phoneNumber
+      }
+      const params = utils.defineGetter(obj, makePhoneCallParams, (_obj, prop) => {
+        utils.warn(
+          `makePhoneCall的参数不支持 ${prop} 属性!`,
+          {
+            apiName: `makePhoneCall/${prop}`,
+            errorType: makePhoneCallParams[prop].type,
+            type: 'api',
+          },
+        )
+      })
+      return my.makePhoneCall(params)
+    },},canIUse:{fn: function fn(params) {
+      const paramsList = params.split('.')
+      if (paramsList[1] && paramsList[1] === 'success') {
+        paramsList[1] = 'return'
+      }
+      const str = paramsList.join('.')
+      return my.canIUse(str)
+    },},getSystemInfoSync:{fn: function fn() {
+      let ret = my.getSystemInfoSync()
+      const getSystemInfoSyncProps
+        = descObj.getSystemInfoSync.body.returnValue.props
+      ret = utils.defineGetter(ret, getSystemInfoSyncProps, (obj, prop) => {
+        utils.warn(`getSystemInfoSync的返回值不支持 ${prop} 属性!`, {
+          apiName: `getSystemInfoSync/${prop}`,
+          errorType: getSystemInfoSyncProps[prop].type,
+          type: 'api',
+        })
+      })
+
+      /**
+       * 处理Android屏幕宽度返回值
+       */
+      if (ret.platform.toLowerCase() === 'android') {
+        ret.platform = 'android'
+        ret.screenWidth /= ret.pixelRatio
+        ret.screenHeight /= ret.pixelRatio
+      } else if (ret.platform.toLowerCase() === 'ios') {
+        ret.platform = 'ios'
+        // mock的安全区位置信息(模拟器iphonex screenHeight:812)
+        if (ret.screenHeight >= propsPolyfill.screenHeight) {
+          ret.safeArea = propsPolyfill.safeArea
+          ret.safeArea.bottom = ret.screenHeight - propsPolyfill.safeHeight
+        } else {
+          ret.safeArea = {
+            bottom: ret.screenHeight,
+            height: ret.screenHeight,
+            left: 0,
+            right: ret.screenWidth,
+            top: ret.statusBarHeight,
+            width: ret.screenWidth,
+          }
+        }
+      }
+      // mock的版本,确保微信小程序源码里读取后和目标版本匹配都能通过
+      ret.SDKVersion = '10.0.0'
+
+      return ret
+    },},getSystemInfo:{fn: function fn(obj = {}) {
+      const getSystemInfoProps = descObj.getSystemInfo.body.returnValue.props
+      my.getSystemInfo({
+        ...obj,
+        success: (res) => {
+          res = utils.defineGetter(res, getSystemInfoProps, (_obj, prop) => {
+            utils.warn(`getSystemInfo的返回值不支持 ${prop} 属性!`, {
+              apiName: `getSystemInfo/${prop}`,
+              errorType: getSystemInfoProps[prop].type,
+              type: 'api',
+            })
+          })
+
+          /**
+           * 处理Android屏幕宽度返回值
+           */
+          if (res.platform.toLowerCase() === 'android') {
+            res.platform = 'android'
+            res.screenWidth /= res.pixelRatio
+            res.screenHeight /= res.pixelRatio
+          } else if (res.platform.toLowerCase() === 'ios') {
+            res.platform = 'ios'
+            if (res.screenHeight >= propsPolyfill.screenHeight) {
+              res.safeArea = propsPolyfill.safeArea
+              res.safeArea.bottom = res.screenHeight - propsPolyfill.safeHeight
+            } else {
+              res.safeArea = {
+                bottom: res.screenHeight,
+                height: res.screenHeight,
+                left: 0,
+                right: res.screenWidth,
+                top: res.statusBarHeight,
+                width: res.screenWidth,
+              }
+            }
+          }
+
+          // mock的版本,确保微信小程序源码里读取后和目标版本匹配都能通过
+          res.SDKVersion = '10.0.0'
+          obj.success && obj.success(res)
+        },
+      })
+    },},showToast:{fn: function fn(obj = {}) {
+      const showToastProps = descObj.showToast.body.params.props
+      if (obj.title) {
+        obj.content = obj.title
+        delete obj.title
+      }
+      if (!obj.duration) {
+        obj.duration = 2000
+      }
+      if (obj.icon) {
+        if (obj.icon === 'success') {
+          obj.type = 'success'
+        } else if (obj.icon === 'loading') {
+          obj.type = 'none'
+          utils.warn('showToast暂不支持loading', {
+            apiName: 'showToast/loading',
+            errorType: 0,
+            type: 'api',
+          })
+        } else {
+          obj.type = 'none'
+        }
+        delete obj.icon
+      } else {
+        obj.type = 'success'
+      }
+
+      const params = utils.defineGetter(obj, showToastProps, (_obj, prop) => {
+        utils.warn(`showToast的参数不支持 ${prop} 属性!`, {
+          apiName: `showToast/${prop}`,
+          errorType: showToastProps[prop].type,
+          type: 'api',
+        })
+      })
+
+      my.showToast(params)
+    },},showModal:{fn: function fn(obj = {}) {
+      const showModalProps = descObj.showModal.body.params.props
+      if (obj.cancelText !== undefined) {
+        obj.cancelButtonText = obj.cancelText
+        delete obj.cancelText
+      }
+
+      if (obj.confirmText !== undefined) {
+        obj.confirmButtonText = obj.confirmText
+        delete obj.confirmText
+      }
+
+      const params = utils.defineGetter(obj, showModalProps, (_obj, prop) => {
+        utils.warn(`showModal的参数不支持 ${prop} 属性!`, {
+          apiName: `showModal/${prop}`,
+          errorType: showModalProps[prop].type,
+          type: 'api',
+        })
+      })
+
+      my.confirm({
+        ...params,
+        success(res) {
+          if (res.confirm) {
+            res.cancel = false
+          } else {
+            res.cancel = true
+          }
+          obj.success && obj.success(res)
+        },
+      })
+    },},showLoading:{fn: function fn(obj = {}) {
+      const showLoadingProps = descObj.showLoading.body.params.props
+      if (obj.title) {
+        obj.content = obj.title
+        delete obj.title
+      }
+      const params = utils.defineGetter(obj, showLoadingProps, (_obj, prop) => {
+        utils.warn(`showLoading的参数不支持 ${prop} 属性!`, {
+          apiName: `showLoading/${prop}`,
+          errorType: showLoadingProps[prop].type,
+          type: 'api',
+        })
+      })
+      my.showLoading(params)
+    },},showActionSheet:{fn: function fn(obj = {}) {
+      const showActionSheetProps = descObj.showActionSheet.body.params.props
+      if (obj.itemList) {
+        obj.items = obj.itemList
+        delete obj.itemList
+      }
+      const params = utils.defineGetter(
+        obj,
+        showActionSheetProps,
+        (_obj, prop) => {
+          utils.warn(`showActionSheet的参数不支持 ${prop} 属性!`, {
+            apiName: `showActionSheet/${prop}`,
+            errorType: showActionSheetProps[prop].type,
+            type: 'api',
+          })
+        },
+      )
+      my.showActionSheet({
+        ...params,
+        success: (res) => {
+          res.tapIndex = res.index
+          delete res.index
+          obj.success && obj.success(res)
+        },
+      })
+    },},hideToast:{fn: function fn(obj) {
+      try {
+        my.hideToast()
+        obj.success
+          && obj.success({
+            errMsg: 'hideToast: ok',
+          })
+      } catch (err) {
+        obj.fail && obj.fail(err)
+      } finally {
+        obj.complete
+          && obj.complete({
+            errMsg: 'hideToast: ok',
+          })
+      }
+    },},hideLoading:{fn: function fn(obj) {
+      try {
+        my.hideLoading()
+        obj.success
+          && obj.success({
+            errMsg: 'hideLoading: ok',
+          })
+      } catch (err) {
+        obj.fail && obj.fail(err)
+      } finally {
+        obj.complete
+          && obj.complete({
+            errMsg: 'hideLoading: ok',
+          })
+      }
+    },},showNavigationBarLoading:{fn: function fn(obj = {}) {
+      try {
+        my.showNavigationBarLoading()
+        obj.success
+          && obj.success({
+            errMsg: 'showNavigationBarLoading: ok',
+          })
+      } catch (err) {
+        obj.fail && obj.fail(err)
+      } finally {
+        obj.complete
+          && obj.complete({
+            errMsg: 'showNavigationBarLoading: ok',
+          })
+      }
+    },},setNavigationBarTitle:{fn: function fn(obj = {}) {
+      return my.setNavigationBar(obj)
+    },},setNavigationBarColor:{fn: function fn(obj = {}) {
+      return my.setNavigationBar(obj)
+    },},hideNavigationBarLoading:{fn: function fn(obj = {}) {
+      try {
+        my.hideNavigationBarLoading()
+        obj.success
+          && obj.success({
+            errMsg: 'hideNavigationBarLoading: ok',
+          })
+      } catch (err) {
+        obj.fail && obj.fail(err)
+      } finally {
+        obj.complete
+          && obj.complete({
+            errMsg: 'hideNavigationBarLoading: ok',
+          })
+      }
+    },},setTabBarStyle:{fn: function fn(obj = {}) {
+      if (obj.color && obj.color.length === 4) {
+        const color = obj.color.slice(1)
+        obj.color = `#${color}${color}`
+      }
+      my.setTabBarStyle(obj)
+    },},setTabBarItem:{fn: function fn(obj = {}) {
+      if (!obj.iconPath || !obj.selectedIconPath) {
+        utils.warn('setTabBarItem的iconPath和selectedIconPath是必传的!', {
+          apiName: 'setTabBarItem/iconPath和selectedIconPath',
+          errorType: 0,
+          type: 'api',
+        })
+      }
+      my.setTabBarItem(obj)
+    },},stopPullDownRefresh:{fn: function fn(obj = {}) {
+      try {
+        my.stopPullDownRefresh()
+        obj.success
+          && obj.success({
+            errMsg: 'stopPullDownRefresh: ok',
+          })
+      } catch (err) {
+        obj.fail && obj.fail(err)
+      } finally {
+        obj.complete
+          && obj.complete({
+            errMsg: 'stopPullDownRefresh: ok',
+          })
+      }
+    },},pageScrollTo:{fn: function fn(obj = {}) {
+      const pageScrollToParams = descObj.pageScrollTo.body.params.props
+      const params = utils.defineGetter(
+        obj,
+        pageScrollToParams,
+        (_obj, prop) => {
+          utils.warn(`pageScrollTo的参数不支持 ${prop} 属性!`, {
+            apiName: `pageScrollTo/${prop}`,
+            errorType: pageScrollToParams[prop].type,
+            type: 'api',
+          })
+        },
+      )
+      my.pageScrollTo(params)
+      try {
+        my.pageScrollTo()
+        obj.success
+          && obj.success({
+            errMsg: 'pageScrollTo: ok',
+          })
+      } catch (err) {
+        obj.fail && obj.fail(err)
+      } finally {
+        obj.complete
+          && obj.complete({
+            errMsg: 'pageScrollTo: ok',
+          })
+      }
+    },},request:{fn: function fn(obj = {}) {
+      if (obj.header) {
+        obj.headers = obj.header
+        delete obj.header
+      }
+
+      obj.method = obj.method || 'GET'
+
+      obj.method = obj.method.toUpperCase()
+
+      if (obj.method !== 'GET' && obj.method !== 'POST') {
+        utils.warn(`request暂不支持${obj.method}请求方式`, {
+          apiName: `request/${obj.method}`,
+          errorType: 0,
+          type: 'api',
+        })
+        obj.method = 'GET'
+      }
+
+      if (obj.responseType) {
+        utils.warn('支付宝暂不支持responseType', {
+          apiName: 'request/responseType',
+          errorType: 0,
+          type: 'api',
+        })
+      }
+      let task = my.request({
+        ...obj,
+        success(res) {
+          res.header = res.headers
+          res.statusCode = res.status
+          delete res.headers
+          delete res.status
+          obj.success && obj.success(res)
+        },
+        fail(err) {
+          const errMsg = 'request:fail abort'
+          if (err.errorMessage === errMsg) {
+            err = {
+              errMsg,
+            }
+          }
+          obj.fail && obj.fail(err)
+        },
+        complete(res) {
+          obj.complete && obj.complete(res)
+        },
+      })
+      task = task || {}
+      task.onHeadersReceived = function() {}
+      task.offHeadersReceived = function() {}
+      return task
+    },},createMapContext:{fn: function fn(obj = {}) {
+      const createMapContextProps
+        = descObj.createMapContext.body.returnValue.props
+      const data = my.createMapContext(obj)
+      for (const key in createMapContextProps) {
+        if (createMapContextProps[key].type === 0) {
+          data[key] = () => {}
+        }
+      }
+      return utils.defineGetter(data, createMapContextProps, (_obj, prop) => {
+        utils.warn(`createMapContext的返回值不支持 ${prop} 属性!`, {
+          apiName: `createMapContext/${prop}`,
+          errorType: createMapContextProps[prop].type,
+          type: 'api',
+        })
+      })
+    },},createVideoContext:{fn: function fn(id, that) {
+      if (that) {
+        utils.warn('createVideoContext暂不支持传递实例this', {
+          apiName: 'createVideoContext',
+          errorType: 0,
+          type: 'api',
+        })
+      }
+      return my.createVideoContext(id)
+    },},createCameraContext:{fn: function fn(id = '') {
+      const res = my.createCameraContext(id)
+      res.setZoom = () => {
+        utils.warn('支付宝暂不支持setZoom', {
+          apiName: 'createCameraContext/setZoom',
+          errorType: 0,
+          type: 'api',
+        })
+      }
+      return res
+    },},previewImage:{fn: function fn(obj = {}) {
+      const imgList = obj.urls || []
+      const index = imgList.indexOf(obj.current)
+      obj.current = index
+      return my.previewImage(obj)
+    },},compressImage:{fn: function fn(obj = {}) {
+      if (obj.src) {
+        obj.apFilePaths = [obj.src]
+        delete obj.src
+      }
+      my.compressImage({
+        ...obj,
+        success(res) {
+          res.tempFilePath = res.apFilePaths[0]
+          delete res.apFilePath
+          obj.success && obj.success(res)
+        },
+      })
+    },},chooseImage:{fn: function fn(obj = {}) {
+      if (!obj.count) {
+        obj.count = 9
+      }
+      my.chooseImage({
+        ...obj,
+        // success(res) {
+        // res.tempFilePaths = res.apFilePaths
+        // delete res.apFilePath
+        // utils.warn('暂不支持tempFiles', {
+        //   apiName: 'chooseImage/tempFiles',
+        //   errorType: 0,
+        //   type: 'api',
+        // })
+        //   obj.success && obj.success(res)
+        // },
+        fail(err) {
+          err.errMsg = err.errorMessage || ''
+        },
+      })
+    },},saveImageToPhotosAlbum:{fn: function fn(obj = {}) {
+      if (obj.filePath) {
+        obj.url = obj.filePath
+      }
+      return my.saveImage(obj)
+    },},openLocation:{fn: function fn(obj = {}) {
+      if (obj.scale) {
+        utils.warn('支付宝scale的取值为3-19,默认15', {
+          apiName: 'openLocation/scale',
+          errorType: 4,
+          type: 'api',
+        })
+
+        if (obj.scale > 19) {
+          obj.scale = 19
+        } else if (obj.scale < 3) {
+          obj.scale = 3
+        }
+      }
+      return my.openLocation(obj)
+    },},getLocation:{fn: function fn(obj = {}) {
+      const type = obj.type || 'wgs84'
+      const getLocationProps = descObj.getLocation.body.returnValue.props
+      my.getLocation({
+        ...obj,
+        type: 0,
+        success(res) {
+          let data = res
+          if (type === 'wgs84') {
+            const lnglat = utils.gcj02towgs84(res.longitude, res.latitude)
+
+            data = Object.assign(res, {
+              longitude: lnglat[0],
+              latitude: lnglat[1],
+            })
+          }
+          data = utils.defineGetter(data, getLocationProps, (_obj, prop) => {
+            utils.warn(`getLocation的返回值不支持 ${prop} 属性!`, {
+              apiName: `getLocation/${prop}`,
+              errorType: getLocationProps[prop].type,
+              type: 'api',
+            })
+          })
+          obj.success && obj.success(data)
+        },
+      })
+    },},openCard:{fn: function fn(obj) {
+      const openCardParams = descObj.openCard.body.params.props
+      const params = utils.defineGetter(obj, openCardParams, (_obj, prop) => {
+        utils.warn(
+          `openCard的参数不支持 ${prop} 属性!`,
+          {
+            apiName: `openCard/${prop}`,
+            errorType: openCardParams[prop].type,
+            type: 'api',
+          },
+        )
+      })
+      return my.openCardList(params)
+    },},login:{fn: function fn(obj = {}) {
+      my.getAuthCode({
+        scopes: 'auth_base',
+        success: (res) => {
+          const resObj = {
+            code: res.authCode,
+          }
+          if (res.authCode) {
+            resObj.errMsg = 'login:ok'
+            if (obj.success) {
+              obj.success(resObj)
+            }
+          } else {
+            resObj.errMsg = 'login:fail'
+            if (obj.success) {
+              obj.success(resObj)
+            }
+          }
+        },
+        fail: (err) => {
+          if (obj.fail) {
+            obj.fail(err)
+          }
+        },
+        complete: (res) => {
+          if (res.authCode) {
+            const resObj = {
+              code: res.authCode,
+              errMsg: 'login:ok',
+            }
+            if (obj.complete) {
+              obj.complete(resObj)
+            }
+          } else if (obj.complete) {
+            obj.complete(res)
+          }
+        },
+      })
+    },},hideKeyboard:{fn: function fn(obj = {}) {
+      my.hideKeyboard(obj)
+
+      if (typeof obj.success === 'function') {
+        obj.success()
+      }
+
+      if (typeof obj.complete === 'function') {
+        obj.complete()
+      }
+    },},getNetworkType:{fn: function fn(obj = {}) {
+      my.getNetworkType({
+        ...obj,
+        success(res) {
+          res.networkType = res.networkType.toLowerCase()
+          const typeObjMap = {
+            unknown: 'unknown',
+            wifi: 'wifi',
+            '2g': '2g',
+            '3g': '3g',
+            '4g': '4g',
+          }
+
+          if (res && !res.networkAvailable) {
+            res.networkType = 'none'
+          } else {
+            res.networkType = typeObjMap[res.networkType] || res.networkType
+          }
+          obj.success && obj.success(res)
+        },
+      })
+    },},canvasToTempFilePath:{fn: function fn(obj = {}) {
+      const ctx = my.createCanvasContext(obj.canvasId)
+      ctx.toTempFilePath({
+        ...obj,
+        success(res) {
+          res.tempFilePath = res.apFilePath
+          delete res.apFilePath
+          obj.success && obj.success(res)
+        },
+      })
+    },},canvasPutImageData:{fn: function fn(obj = {}) {
+      const ctx = my.createCanvasContext(obj.canvasId)
+      ctx.putImageData({
+        ...obj,
+        success(res) {
+          obj.success && obj.success(res)
+        },
+      })
+    },},canvasGetImageData:{fn: function fn(obj = {}) {
+      const ctx = my.createCanvasContext(obj.canvasId)
+      ctx.getImageData({
+        ...obj,
+        success(res) {
+          obj.success && obj.success(res)
+        },
+      })
+    },},saveFile:{fn: function fn(obj = {}) {
+      if (obj.tempFilePath) {
+        obj.apFilePath = obj.tempFilePath
+        delete obj.tempFilePath
+      }
+      my.saveFile({
+        ...obj,
+        success(res) {
+          res.savedFilePath = res.apFilePath
+          delete res.apFilePath
+          obj.success && obj.success(res)
+        },
+      })
+    },},removeSavedFile:{fn: function fn(obj = {}) {
+      if (obj.filePath) {
+        obj.apFilePath = obj.filePath
+        delete obj.filePath
+      }
+      return my.removeSavedFile(obj)
+    },},getSavedFileList:{fn: function fn(obj = {}) {
+      my.getSavedFileList({
+        success(res) {
+          if (res.fileList.length) {
+            const ret = res.fileList.map((item) => {
+              item.filePath = item.apFilePath
+              delete item.apFilePath
+              return item
+            })
+            res.fileList = ret
+            obj.success && obj.success(res)
+          } else {
+            obj.success && obj.success(res)
+          }
+        },
+      })
+    },},getSavedFileInfo:{fn: function fn(obj = {}) {
+      if (obj.filePath) {
+        obj.apFilePath = obj.filePath
+        delete obj.filePath
+      }
+      return my.getSavedFileInfo(obj)
+    },},getFileInfo:{fn: function fn(obj = {}) {
+      if (obj.filePath) {
+        obj.apFilePath = obj.filePath
+        delete obj.filePath
+      }
+      return my.getFileInfo(obj)
+    },},downloadFile:{fn: function fn(obj = {}) {
+      const downloadFileReturnValue
+        = descObj.downloadFile.body.returnValue.props
+      if (obj.filePath !== undefined) {
+        utils.warn('支付宝暂不支持 filePath', {
+          apiName: 'downloadFile/filePath',
+          errorType: 0,
+          type: 'api',
+        })
+      }
+      my.downloadFile({
+        ...obj,
+        success(res) {
+          res.tempFilePath = res.apFilePath
+          if (res.apFilePath) {
+            res.statusCode = 200
+          }
+          delete res.apFilePath
+          if (!res.statusCode) {
+            utils.warn('支付宝暂不支持statusCode', {
+              apiName: 'downloadFile/statusCode',
+              errorType: 0,
+              type: 'api',
+            })
+          }
+          obj.success && obj.success(res)
+        },
+      })
+      const task = {
+        abort() {},
+        offHeadersReceived() {},
+        offProgressUpdate() {},
+        onHeadersReceived() {},
+        onProgressUpdate() {},
+      }
+      return utils.defineGetter(task, downloadFileReturnValue, (_obj, prop) => {
+        utils.warn(`downloadFile的返回值不支持 ${prop} 属性!`, {
+          apiName: `downloadFile/${prop}`,
+          errorType: downloadFileReturnValue[prop].type,
+          type: 'api',
+        })
+      })
+    },},uploadFile:{fn: function fn(obj = {}) {
+      const uploadFileValue = descObj.uploadFile.body.returnValue.props
+      if (obj.name) {
+        obj.fileName = obj.name
+        delete obj.name
+      }
+      const pathArr = obj.filePath.split('.')
+      obj.fileType = 'image'
+      const fileType = {
+        video: ['ogg', 'avi', 'wma', 'rmvb', 'rm', 'flash', 'mp4', '3gp'],
+        audio: ['wav', 'mp3'],
+      }
+      const typeName = pathArr[pathArr.length - 1]
+      Object.keys(fileType).forEach((key) => {
+        fileType[key].forEach((item) => {
+          if (typeName.toLowerCase() === item) {
+            obj.fileType = key
+          }
+        })
+      })
+      my.uploadFile(obj)
+      const task = {
+        abort() {},
+        offHeadersReceived() {},
+        offProgressUpdate() {},
+        onHeadersReceived() {},
+        onProgressUpdate() {},
+      }
+      return utils.defineGetter(task, uploadFileValue, (_obj, prop) => {
+        utils.warn(`uploadFile的返回值不支持 ${prop} 属性!`, {
+          apiName: `uploadFile/${prop}`,
+          errorType: uploadFileValue[prop].type,
+          type: 'api',
+        })
+      })
+    },},connectSocket:{fn: function fn(obj = {}) {
+      const connectSocketParams = descObj.connectSocket.body.params.props
+      const params = utils.defineGetter(
+        obj,
+        connectSocketParams,
+        (_obj, prop) => {
+          utils.warn(`connectSocket的参数不支持 ${prop} 属性!`, {
+            apiName: `connectSocket/${prop}`,
+            errorType: connectSocketParams[prop].type,
+            type: 'api',
+          })
+        },
+      )
+      my.connectSocket(params)
+      const task = {
+        close(_obj = {}) {
+          my.closeSocket(_obj)
+        },
+        onClose(fn) {
+          my.onSocketClose(fn)
+        },
+        onError(fn) {
+          my.offSocketOpen(fn)
+        },
+        onMessage(fn) {
+          my.onSocketMessage(fn)
+        },
+        onOpen(fn) {
+          my.onSocketOpen((res) => {
+            fn(res)
+          })
+        },
+        send(_obj = {}) {
+          my.sendSocketMessage(_obj)
+        },
+      }
+      return task
+    },},onSocketOpen:{fn: function fn(obj) {
+      my.onSocketOpen((res) => {
+        utils.warn('onSocketOpen 成功回调缺少header', {
+          apiName: 'onSocketOpen/header',
+          errorType: 0,
+          type: 'api',
+        })
+        obj(res)
+      })
+    },},closeSocket:{fn: function fn(obj = {}) {
+      const closeSocketParams = descObj.closeSocket.body.params.props
+      const params = utils.defineGetter(
+        obj,
+        closeSocketParams,
+        (_obj, prop) => {
+          utils.warn(`closeSocket的参数不支持 ${prop} 属性!`, {
+            apiName: `closeSocket/${prop}`,
+            errorType: closeSocketParams[prop].type,
+            type: 'api',
+          })
+        },
+      )
+      my.closeSocket(params)
+    },},getRecorderManager:{fn: function fn() {
+      const getRecorderManagerProps
+        = descObj.getRecorderManager.body.returnValue.props
+      const RecorderManager = my.getRecorderManager()
+      for (const key in getRecorderManagerProps) {
+        if (getRecorderManagerProps[key].type === 0) {
+          RecorderManager[key] = () => {}
+        }
+      }
+      return utils.defineGetter(
+        RecorderManager,
+        getRecorderManagerProps,
+        (obj, prop) => {
+          utils.warn(`getRecorderManager的返回值不支持 ${prop} 属性!`, {
+            apiName: `getRecorderManager/${prop}`,
+            errorType: getRecorderManagerProps[prop].type,
+            type: 'api',
+          })
+        },
+      )
+    },},setStorageSync:{fn:function fn(key = '', data = '') {
+      return my.setStorageSync({
+        key,
+        data,
+      })
+    },},getStorage:{fn:function fn(obj) {
+      return my.getStorage({
+        key: obj.key,
+        success: (res) => {
+          if (
+            res.message
+            && res.message === '查无此key'
+            && typeof obj.fail === 'function'
+          ) {
+            const Msg = {
+              errMsg: 'getStorage:fail data not found',
+            }
+            obj.fail(Msg)
+          } else if (typeof obj.success === 'function') {
+            obj.success(res)
+          }
+        },
+        complete: (res) => {
+          if (typeof obj.complete === 'function') {
+            if (res.message && res.message === '查无此key') {
+              const Msg = {
+                errMsg: 'getStorage:fail data not found',
+              }
+              obj.complete(Msg)
+            } else {
+              obj.complete(res)
+            }
+          }
+        },
+      })
+    },},getStorageSync:{fn: function fn(key = '') {
+      const storeData = my.getStorageSync({
+        key,
+      })
+
+      return storeData.data || ''
+    },},removeStorageSync:{fn: function fn(key = '') {
+      return my.removeStorageSync({
+        key,
+      })
+    },},removeStorage:{fn:function fn(obj) {
+      const Msg = {
+        errMsg: 'removeStorage:ok',
+      }
+      return my.removeStorage({
+        ...obj,
+        success: () => {
+          if (typeof obj.success === 'function') {
+            obj.success(Msg)
+          }
+        },
+        complete: () => {
+          if (typeof obj.complete === 'function') {
+            obj.complete(Msg)
+          }
+        },
+      })
+    },},createSelectorQuery:{fn: function fn() {
+      const SQ = my.createSelectorQuery()
+
+      function Query() {
+        this.query = SQ
+        this._selectType = 0 // 0: array, 1: object
+        this.in = function(p) {
+          if (typeof this.query.in === 'function') {
+            this.query.in(p)
+            return this
+          } else {
+            return this
+          }
+        }
+        this.select = function(p) {
+          const s = utils.parseSelector(p)
+          this.query.select(s)
+          this._selectType = 1
+          return this
+        }
+
+        this.node = () => {
+          utils.warn('支付宝暂不支持使用SelectorQuery NodesRef.node', {
+            apiName: 'SelectorQuery NodesRef.node',
+            errorType: 0,
+            type: 'api',
+          })
+          return this
+        }
+
+        this.selectAll = function(p) {
+          const s = utils.parseSelector(p)
+          this.query.selectAll(s)
+          return this
+        }
+
+        this.selectViewport = function(p) {
+          this.query.selectViewport(p)
+          return this
+        }
+
+        this.boundingClientRect = function(p) {
+          this.query.boundingClientRect()
+          this.exec(p)
+          return this
+        }
+
+        this.scrollOffset = function(p) {
+          const self = this
+          this.query.scrollOffset().exec((ret) => {
+            if (self._selectType) {
+              self._selectType = 0
+              if (Array.isArray(ret) && ret.length === 1) {
+                ret = ret[0]
+              }
+            }
+
+            p && p(ret)
+          })
+          return this
+        }
+
+        this.exec = function(p) {
+          this.query.exec((ret) => {
+            if (Array.isArray(ret)) {
+              ret = ret.map((obj) => {
+                return Array.isArray(obj)
+                  ? obj.map((item) => ({
+                    ...item,
+                    id: utils.nextUid(),
+                  }))
+                  : {
+                    ...obj,
+                    id: utils.nextUid(),
+                  }
+              })
+            }
+            if (this._selectType) {
+              this._selectType = 0
+              if (Array.isArray(ret)) {
+                if (ret.length === 1) {
+                  ret = ret[0]
+                } else if (ret.length > 1) {
+                  utils.warn(
+                    '支付宝SelectorQuery.exec查询结果按请求次序构成数组,数组中每项为一次查询的结果',
+                    {
+                      apiName: 'boundingClientRect',
+                      errorType: 1,
+                      type: 'api',
+                    },
+                  )
+                }
+              }
+            }
+            p && p(ret)
+          })
+          return this
+        }
+      }
+
+      Query.prototype = SQ
+
+      const res = new Query()
+
+      return res
+    },},createIntersectionObserver:{fn: function fn(...p) {
+      const OB = my.createIntersectionObserver(...p)
+
+      function Observer() {
+        this.observer = OB
+        this.relativeTo = function(...args) {
+          const t = utils.parseSelector(args[0])
+          const o = args[1]
+          this.observer.relativeTo(t, o)
+          return this
+        }
+        this.relativeToViewport = function(...args) {
+          this.observer.relativeToViewport(...args)
+          return this
+        }
+        this.observe = function(...args) {
+          const t = utils.parseSelector(args[0])
+          const cb = args[1]
+          this.observer.observe(t, (ret) => {
+            cb && cb(ret)
+          })
+        }
+      }
+
+      Observer.prototype = OB
+
+      const res = new Observer()
+
+      return res
+    },},createAnimation:{fn: function fn(obj = {}) {
+      if (obj.timingFunction) {
+        obj.timeFunction = obj.timingFunction
+        delete obj.timingFunction
+      }
+      const animation = my.createAnimation(obj)
+      animation.config.delay = animation.config.delay || 0
+      animation.option = {
+        transition: animation.config,
+        transformOrigin: animation.config.transformOrigin,
+      }
+      return animation
+    },},showShareMenu:{fn: function fn() {
+      return my.showSharePanel()
+    },},saveVideoToPhotosAlbum:{fn: function fn(obj = {}) {
+      const params = {
+        ...obj,
+        src: obj.filePath,
+      }
+      return my.saveVideoToPhotosAlbum(params)
+    },},chooseAddress:{fn: function fn(obj = {}) {
+      my.getAddress({
+        success(_res) {
+          const result = {}
+          const res = _res.result
+          result.cityName = res.city
+          result.countyName = res.area
+          result.detailInfo = res.street
+          result.errMsg = 'chooseAddress:ok'
+          result.nationalCode = ''
+          result.postalCode = ''
+          result.provinceName = res.prov
+          result.telNumber = res.mobilePhone
+          result.userName = res.fullname
+
+          obj.success && obj.success(result)
+        },
+      })
+    },},chooseVideo:{fn: function fn(obj = {}) {
+      my.chooseVideo({
+        success(result) {
+          result.tempFilePath = result.apFilePath
+          delete result.apFilePath
+          obj.success && obj.success(result)
+        },
+      })
+    },},getUpdateManager:{fn: function fn() {
+      return my.getUpdateManager()
+    },},getUserInfo:{fn: function fn(obj) {
+      const getUserInfoSuccessRes = descObj.getUserInfo.body.params.props
+      if (obj.withCredentials || obj.lang) {
+        utils.warn(
+          'GetAuthUserInfo不支持 withCredentials 或 lang 参数.',
+          {
+            apiName: 'getUserInfo/withCredentials 或 getUserInfo/lang',
+            errorType: 0,
+            type: 'api',
+          },
+        )
+      }
+
+      my.getAuthCode({
+        scopes: 'auth_user',
+        success: () => {
+          my.getAuthUserInfo({
+            ...obj,
+            success(res) {
+              utils.defineGetter(res, getUserInfoSuccessRes, (_obj, prop) => {
+                utils.warn(
+                  `getUserInfo的参数不支持 ${prop} 属性!`,
+                  {
+                    apiName: `getUserInfo/${prop}`,
+                    errorType: getUserInfoSuccessRes[prop].type,
+                    type: 'api',
+                  },
+                )
+              })
+
+              const _res = {}
+              _res.userInfo = res
+              _res.userInfo.avatarUrl = res.avatar
+              obj.success && obj.success(_res)
+            },
+          })
+        },
+      })
+    },},reportAnalytics:{fn: function fn(key, value) {
+      if (typeof value !== 'object') {
+        if (!(value instanceof Object)) {
+          value = {
+            data: value,
+          }
+        }
+      }
+      return my.reportAnalytics(key, value)
+    },},requestPayment:{fn: function fn(obj = {}) {
+      const requestPaymentParams = descObj.requestPayment.body.params.props
+      const params = utils.defineGetter(obj, requestPaymentParams, (_obj, prop) => {
+        utils.warn(
+          `requestPayment的参数不支持 ${prop} 属性!`,
+          {
+            apiName: `requestPayment/${prop}`,
+            errorType: requestPaymentParams[prop].type,
+            type: 'api',
+          },
+        )
+      })
+      return my.tradePay(params)
+    },},authorize:{fn: function fn(obj = {}) {
+      const authorizeParams = descObj.authorize.body.params.props
+      if (obj.scope) {
+        delete obj.scope
+        obj.scopes = 'auth_user'
+      }
+      const params = utils.defineGetter(obj, authorizeParams, (_obj, prop) => {
+        utils.warn(
+          `authorize的参数不支持 ${prop} 属性!`,
+          {
+            apiName: `authorize/${prop}`,
+            errorType: authorizeParams[prop].type,
+            type: 'api',
+          },
+        )
+      })
+      return my.getAuthCode(params)
+    },},addCard:{fn: function fn(obj) {
+      const addCardParams = descObj.addCard.body.params.props
+      const params = utils.defineGetter(obj, addCardParams, (_obj, prop) => {
+        utils.warn(
+          `addCard的参数不支持 ${prop} 属性!`,
+          {
+            apiName: `startSoterAuthentication/${prop}`,
+            errorType: addCardParams[prop].type,
+            type: 'api',
+          },
+        )
+      })
+      return my.addCardAuth(params)
+    },},startSoterAuthentication:{fn: function fn(obj) {
+      const startSoterAuthenticationParams = descObj.startSoterAuthentication.body.params.props
+      const params = utils.defineGetter(obj, startSoterAuthenticationParams, (_obj, prop) => {
+        utils.warn(
+          `startSoterAuthentication的参数不支持 ${prop} 属性!`,
+          {
+            apiName: prop,
+            errorType: startSoterAuthenticationParams[prop].type,
+            type: 'api',
+          },
+        )
+      })
+      return my.ap.faceVerify(params)
+    },},getSetting:{fn: function fn(options = {}) {
+      function setLocation(cb) {
+        my.getLocation({
+          success(res) {
+            res.authSetting['scope.userLocation'] = true
+            cb && cb()
+          },
+        })
+      }
+      if (my.getSetting) {
+        my.getSetting({
+          ...options,
+          success(res) {
+            const { success } = options
+
+            if (!success) { return }
+
+            success({
+              authSetting: utils.mapAuthSetting(res.authSetting),
+            })
+          },
+        })
+      } else {
+        const res = {}
+        res.authSetting = {}
+
+        /**
+                   * scope=[userInfo, location, album, camera, audioRecord]
+                   */
+
+        if (options && options.success) {
+          setLocation(() => {
+            options.success(res)
+          })
+        }
+      }
+    },},openSetting:{fn: function fn(options = {}) {
+      my.openSetting({
+        ...options,
+        success: (res) => {
+          const { success } = options
+
+          if (!success) {
+            return
+          }
+
+          success({
+            authSetting: utils.mapAuthSetting(res.authSetting),
+          })
+        },
+      })
+    },},hideHomeButton:{fn: function fn(obj = {}) {
+      const hideHomeButtonProps = descObj.hideHomeButton.body.params.props
+      const param = utils.defineGetter(obj, hideHomeButtonProps, (_obj, prop) => {
+        utils.warn(
+          `hideHomeButton的返回值不支持 ${prop} 属性!`,
+          {
+            apiName: `hideHomeButton/${prop}`,
+            errorType: hideHomeButtonProps[prop].type,
+            type: 'api',
+          },
+        )
+      })
+      return my.hideBackHome(param)
+    },},cloud:{init: function init() {
+      utils.warn(
+        '支付宝暂不支持init',
+        {
+          apiName: 'cloud/init',
+          errorType: 0,
+          type: 'api',
+        },
+      )
+    },},nextTick:function nextTick(fn, delay = 0) {
+  if (typeof fn === 'function') {
+    if (!delay) {
+      Promise.resolve().then(fn)
+    } else {
+      setTimeout(fn, delay)
+    }
+  }
+},}
+module.exports = apiObj;

+ 15 - 0
__antmove/api/propsPolyfill.js

@@ -0,0 +1,15 @@
+const screenHeight = 812
+const safeHeight = 44
+const safeArea = {
+  bottom: 862,
+  height: 818,
+  left: 0,
+  right: 414,
+  top: 44,
+  width: 414,
+}
+module.exports = {
+  screenHeight,
+  safeArea,
+  safeHeight,
+}

+ 2212 - 0
__antmove/api/relations.js

@@ -0,0 +1,2212 @@
+module.exports = {
+'components/addCarNumber/index': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ]
+    }
+    ,'components/addCarNumber/index': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ]
+    }
+    ,'components/area-picker/index': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ]
+    }
+    ,'components/area-picker/index': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ]
+    }
+    ,'components/autoAdd/index': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: [
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef3',
+        children: []
+    }
+    ]
+    }
+    ]
+    }
+    ,'components/autoAdd/index': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: [
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef3',
+        children: []
+    }
+    ]
+    }
+    ]
+    }
+    ,'components/catchFace/index': 
+    {
+        id: 'saveChildRef0',
+        children: []
+    }
+    ,'components/catchFace/index': 
+    {
+        id: 'saveChildRef0',
+        children: []
+    }
+    ,'components/customField/customField': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ]
+    }
+    ,'components/customField/customField': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ]
+    }
+    ,'components/detailsCard/index': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef3',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef4',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef5',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef6',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef7',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef8',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef9',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef10',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef11',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef12',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef13',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef14',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef15',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef16',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef17',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef18',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef19',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef20',
+        children: [
+    {
+        id: 'saveChildRef21',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef22',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef23',
+        children: [
+    {
+        id: 'saveChildRef24',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef25',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef26',
+        children: [
+    {
+        id: 'saveChildRef27',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef28',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef29',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef30',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef31',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef32',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef33',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef34',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef35',
+        children: []
+    }
+    ]
+    }
+    ,'components/detailsCard/index': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef3',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef4',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef5',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef6',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef7',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef8',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef9',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef10',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef11',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef12',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef13',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef14',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef15',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef16',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef17',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef18',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef19',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef20',
+        children: [
+    {
+        id: 'saveChildRef21',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef22',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef23',
+        children: [
+    {
+        id: 'saveChildRef24',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef25',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef26',
+        children: [
+    {
+        id: 'saveChildRef27',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef28',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef29',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef30',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef31',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef32',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef33',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef34',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef35',
+        children: []
+    }
+    ]
+    }
+    ,'components/dotLine/index': 
+    {
+        id: 'saveChildRef0',
+        children: []
+    }
+    ,'components/dotLine/index': 
+    {
+        id: 'saveChildRef0',
+        children: []
+    }
+    ,'components/face_verify/face_verify': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: [
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef3',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef4',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef5',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef6',
+        children: [
+    {
+        id: 'saveChildRef7',
+        children: []
+    }
+    ]
+    }
+    ]
+    }
+    ]
+    }
+    ,'components/face_verify/face_verify': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: [
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef3',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef4',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef5',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef6',
+        children: [
+    {
+        id: 'saveChildRef7',
+        children: []
+    }
+    ]
+    }
+    ]
+    }
+    ]
+    }
+    ,'components/input/index': 
+    {
+        id: 'saveChildRef0',
+        children: []
+    }
+    ,'components/input/index': 
+    {
+        id: 'saveChildRef0',
+        children: []
+    }
+    ,'components/navigator/index': 
+    {
+        id: 'saveChildRef0',
+        children: []
+    }
+    ,'components/navigator/index': 
+    {
+        id: 'saveChildRef0',
+        children: []
+    }
+    ,'components/ocrLicense/index': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: [
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef3',
+        children: []
+    }
+    ]
+    }
+    ,'components/ocrLicense/index': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: [
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef3',
+        children: []
+    }
+    ]
+    }
+    ,'components/picker/index': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef3',
+        children: []
+    }
+    ]
+    }
+    ,'components/picker/index': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef3',
+        children: []
+    }
+    ]
+    }
+    ,'components/radioAndcheckbox/index': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ]
+    }
+    ,'components/radioAndcheckbox/index': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ]
+    }
+    ,'components/radioGroup/index': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: [
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ]
+    }
+    ]
+    }
+    ,'components/radioGroup/index': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: [
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ]
+    }
+    ]
+    }
+    ,'components/tailTip/index': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ]
+    }
+    ,'components/tailTip/index': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ]
+    }
+    ,'components/three_yards/three_yards': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: [
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef3',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef4',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef5',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef6',
+        children: []
+    }
+    ]
+    }
+    ,'components/three_yards/three_yards': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: [
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef3',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef4',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef5',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef6',
+        children: []
+    }
+    ]
+    }
+    ,'components/zyh_card/zyh_card': 
+    {
+        id: 'saveChildRef0',
+        children: []
+    }
+    ,'components/zyh_card/zyh_card': 
+    {
+        id: 'saveChildRef0',
+        children: []
+    }
+    ,'components/zyh_card2/index': 
+    {
+        id: 'saveChildRef0',
+        children: []
+    }
+    ,'components/zyh_card2/index': 
+    {
+        id: 'saveChildRef0',
+        children: []
+    }
+    ,'components/zyh_desc/zyh_desc': 
+    {
+        id: 'saveChildRef0',
+        children: []
+    }
+    ,'components/zyh_desc/zyh_desc': 
+    {
+        id: 'saveChildRef0',
+        children: []
+    }
+    ,'pages/changeUserInfo/index': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef2',
+        children: [
+    {
+        id: 'saveChildRef3',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef4',
+        children: [
+    {
+        id: 'saveChildRef5',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef6',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef7',
+        children: []
+    }
+    ]
+    }
+    ,'pages/changeUserInfo/index': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef2',
+        children: [
+    {
+        id: 'saveChildRef3',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef4',
+        children: [
+    {
+        id: 'saveChildRef5',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef6',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef7',
+        children: []
+    }
+    ]
+    }
+    ,'pages/company_register/company_register': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef3',
+        children: [
+    {
+        id: 'saveChildRef4',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef5',
+        children: [
+    {
+        id: 'saveChildRef6',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef7',
+        children: [
+    {
+        id: 'saveChildRef8',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef9',
+        children: [
+    {
+        id: 'saveChildRef10',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef11',
+        children: [
+    {
+        id: 'saveChildRef12',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef13',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef14',
+        children: [
+    {
+        id: 'saveChildRef15',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef16',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef17',
+        children: [
+    {
+        id: 'saveChildRef18',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef19',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef20',
+        children: [
+    {
+        id: 'saveChildRef21',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef22',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef23',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef24',
+        children: [
+    {
+        id: 'saveChildRef25',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef26',
+        children: [
+    {
+        id: 'saveChildRef27',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef28',
+        children: [
+    {
+        id: 'saveChildRef29',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef30',
+        children: [
+    {
+        id: 'saveChildRef31',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef32',
+        children: [
+    {
+        id: 'saveChildRef33',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef34',
+        children: [
+    {
+        id: 'saveChildRef35',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef36',
+        children: [
+    {
+        id: 'saveChildRef37',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef38',
+        children: [
+    {
+        id: 'saveChildRef39',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef40',
+        children: [
+    {
+        id: 'saveChildRef41',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef42',
+        children: [
+    {
+        id: 'saveChildRef43',
+        children: []
+    }
+    ]
+    }
+    ]
+    }
+    ,'pages/company_register/company_register': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef3',
+        children: [
+    {
+        id: 'saveChildRef4',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef5',
+        children: [
+    {
+        id: 'saveChildRef6',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef7',
+        children: [
+    {
+        id: 'saveChildRef8',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef9',
+        children: [
+    {
+        id: 'saveChildRef10',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef11',
+        children: [
+    {
+        id: 'saveChildRef12',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef13',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef14',
+        children: [
+    {
+        id: 'saveChildRef15',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef16',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef17',
+        children: [
+    {
+        id: 'saveChildRef18',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef19',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef20',
+        children: [
+    {
+        id: 'saveChildRef21',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef22',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef23',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef24',
+        children: [
+    {
+        id: 'saveChildRef25',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef26',
+        children: [
+    {
+        id: 'saveChildRef27',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef28',
+        children: [
+    {
+        id: 'saveChildRef29',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef30',
+        children: [
+    {
+        id: 'saveChildRef31',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef32',
+        children: [
+    {
+        id: 'saveChildRef33',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef34',
+        children: [
+    {
+        id: 'saveChildRef35',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef36',
+        children: [
+    {
+        id: 'saveChildRef37',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef38',
+        children: [
+    {
+        id: 'saveChildRef39',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef40',
+        children: [
+    {
+        id: 'saveChildRef41',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef42',
+        children: [
+    {
+        id: 'saveChildRef43',
+        children: []
+    }
+    ]
+    }
+    ]
+    }
+    ,'pages/faceCheck/faceCheck': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ]
+    }
+    ,'pages/faceCheck/faceCheck': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ]
+    }
+    ,'pages/mine/mine': 
+    {
+        id: 'saveChildRef0',
+        children: []
+    }
+    ,'pages/mine/mine': 
+    {
+        id: 'saveChildRef0',
+        children: []
+    }
+    ,'pages/ocr/ocr': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: [
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ]
+    }
+    ]
+    }
+    ,'pages/ocr/ocr': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: [
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ]
+    }
+    ]
+    }
+    ,'pages/regular_company_manage/regular_company_manage': 
+    {
+        id: 'saveChildRef0',
+        children: []
+    }
+    ,'pages/regular_company_manage/regular_company_manage': 
+    {
+        id: 'saveChildRef0',
+        children: []
+    }
+    ,'pages/regular_invite/regular_invite': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: [
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef3',
+        children: [
+    {
+        id: 'saveChildRef4',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef5',
+        children: [
+    {
+        id: 'saveChildRef6',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef7',
+        children: [
+    {
+        id: 'saveChildRef8',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef9',
+        children: [
+    {
+        id: 'saveChildRef10',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef11',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef12',
+        children: [
+    {
+        id: 'saveChildRef13',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef14',
+        children: []
+    }
+    ]
+    }
+    ,'pages/regular_invite/regular_invite': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: [
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef3',
+        children: [
+    {
+        id: 'saveChildRef4',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef5',
+        children: [
+    {
+        id: 'saveChildRef6',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef7',
+        children: [
+    {
+        id: 'saveChildRef8',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef9',
+        children: [
+    {
+        id: 'saveChildRef10',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef11',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef12',
+        children: [
+    {
+        id: 'saveChildRef13',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef14',
+        children: []
+    }
+    ]
+    }
+    ,'pages/regular_msg/regular_msg': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ]
+    }
+    ,'pages/regular_msg/regular_msg': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ]
+    }
+    ,'pages/regular_register/regular_register': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef3',
+        children: [
+    {
+        id: 'saveChildRef4',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef5',
+        children: [
+    {
+        id: 'saveChildRef6',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef7',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef8',
+        children: []
+    }
+    ]
+    }
+    ,'pages/regular_register/regular_register': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef3',
+        children: [
+    {
+        id: 'saveChildRef4',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef5',
+        children: [
+    {
+        id: 'saveChildRef6',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef7',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef8',
+        children: []
+    }
+    ]
+    }
+    ,'pages/regular_visit_details/regular_visit_details': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef2',
+        children: [
+    {
+        id: 'saveChildRef3',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef4',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef5',
+        children: [
+    {
+        id: 'saveChildRef6',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef7',
+        children: [
+    {
+        id: 'saveChildRef8',
+        children: [
+    {
+        id: 'saveChildRef9',
+        children: []
+    }
+    ]
+    }
+    ]
+    }
+    ]
+    }
+    ,'pages/regular_visit_details/regular_visit_details': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef2',
+        children: [
+    {
+        id: 'saveChildRef3',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef4',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef5',
+        children: [
+    {
+        id: 'saveChildRef6',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef7',
+        children: [
+    {
+        id: 'saveChildRef8',
+        children: [
+    {
+        id: 'saveChildRef9',
+        children: []
+    }
+    ]
+    }
+    ]
+    }
+    ]
+    }
+    ,'pages/regular_visit_records/regular_visit_records': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef3',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef4',
+        children: []
+    }
+    ]
+    }
+    ,'pages/regular_visit_records/regular_visit_records': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef3',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef4',
+        children: []
+    }
+    ]
+    }
+    ,'pages/resitor_scence/resitor_scence': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: [
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef3',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef4',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef5',
+        children: []
+    }
+    ]
+    }
+    ,'pages/resitor_scence/resitor_scence': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: [
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef3',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef4',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef5',
+        children: []
+    }
+    ]
+    }
+    ,'pages/visitor_make/visitor_make': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef3',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef4',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef5',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef6',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef7',
+        children: [
+    {
+        id: 'saveChildRef8',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef9',
+        children: [
+    {
+        id: 'saveChildRef10',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef11',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef12',
+        children: [
+    {
+        id: 'saveChildRef13',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef14',
+        children: [
+    {
+        id: 'saveChildRef15',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef16',
+        children: [
+    {
+        id: 'saveChildRef17',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef18',
+        children: [
+    {
+        id: 'saveChildRef19',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef20',
+        children: [
+    {
+        id: 'saveChildRef21',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef22',
+        children: [
+    {
+        id: 'saveChildRef23',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef24',
+        children: [
+    {
+        id: 'saveChildRef25',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef26',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef27',
+        children: []
+    }
+    ]
+    }
+    ,'pages/visitor_make/visitor_make': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef3',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef4',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef5',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef6',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef7',
+        children: [
+    {
+        id: 'saveChildRef8',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef9',
+        children: [
+    {
+        id: 'saveChildRef10',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef11',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef12',
+        children: [
+    {
+        id: 'saveChildRef13',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef14',
+        children: [
+    {
+        id: 'saveChildRef15',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef16',
+        children: [
+    {
+        id: 'saveChildRef17',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef18',
+        children: [
+    {
+        id: 'saveChildRef19',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef20',
+        children: [
+    {
+        id: 'saveChildRef21',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef22',
+        children: [
+    {
+        id: 'saveChildRef23',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef24',
+        children: [
+    {
+        id: 'saveChildRef25',
+        children: []
+    }
+    ]
+    }
+    ,
+    {
+        id: 'saveChildRef26',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef27',
+        children: []
+    }
+    ]
+    }
+    ,'pages/visit_records/visit_records': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ]
+    }
+    ,'pages/visit_records/visit_records': 
+    {
+        id: 'saveChildRef0',
+        children: [
+    {
+        id: 'saveChildRef1',
+        children: []
+    }
+    ,
+    {
+        id: 'saveChildRef2',
+        children: []
+    }
+    ]
+    }
+    ,}

+ 143 - 0
__antmove/api/runtimeProcess.js

@@ -0,0 +1,143 @@
+const myApi = require('./my')
+const utils = require('./utils.js')
+const globalVar = require('./config').global
+
+const hasProxy = typeof Proxy !== 'undefined'
+let _Proxy = function() { }
+if (hasProxy) { _Proxy = Proxy }
+
+let myProxy = null
+
+/**
+ * runtime error catch
+ */
+function warnApi(api) {
+  const iscanIuse = globalVar.canIUse(api)
+  // my下有此方法,但目前不可用
+  if (!iscanIuse || api === 'getFileSystemManager') {
+    utils.warn(
+      `支付宝暂不支持${api}`,
+      {
+        apiName: api,
+        errorType: 0,
+        type: 'api',
+      },
+    )
+
+    return function() {
+      console.error(`支付宝暂不支持${api}`)
+    }
+  }
+}
+
+module.exports = function(obj = {}) {
+  if (myProxy) {
+    return myProxy
+  }
+
+  const _obj = Object.assign({}, obj, myApi)
+  if (!hasProxy) {
+    Object.keys(myApi)
+      .forEach((attr) => {
+        Object.defineProperty(_obj, attr, {
+          get() {
+            let ret
+            if (myApi[attr]) {
+              ret = function(o = {}, args = '') {
+                if (args) {
+                  return myApi[attr].fn(o, args)
+                }
+                return myApi[attr].fn(o)
+              }
+            } else {
+              const helpFn = warnApi(attr)
+              ret = obj[attr] || helpFn
+            }
+
+            return ret
+          },
+        })
+      })
+    return _obj
+  }
+  myProxy = new _Proxy(_obj, {
+    get(target, attr) {
+      let ret
+      if (typeof attr === 'string' && myApi[attr]) {
+        if (typeof myApi[attr].fn === 'function') {
+          ret = function(opts = {}, args = '') {
+            if (args) {
+              return myApi[attr].fn(opts, args)
+            }
+            return myApi[attr].fn(opts)
+          }
+        } else {
+          ret = myApi[attr]
+        }
+      } else {
+        const helpFn = warnApi(attr)
+        ret = target[attr] || helpFn
+      }
+
+      return ret
+    },
+  })
+
+  return myProxy
+}
+
+/**
+ * for bindgetuserinfo open-type of button
+ */
+myApi.getUserInfoWrap = {
+  fn(e = {}, fn) {
+    globalVar.getAuthCode({
+      scopes: 'auth_user',
+      success: () => {
+        globalVar.getAuthUserInfo({
+          success(userInfo) {
+            fn && fn({
+              ...e,
+              detail: {
+                userInfo,
+              },
+            })
+          },
+        })
+      },
+      fail(res) {
+        fn && fn({
+          ...e,
+          detail: res,
+        })
+      },
+    })
+  },
+}
+
+/**
+ * for bindgetphonenumber open-type of button
+ */
+myApi.getPhoneNumberWrap = {
+  fn(e = {}, fn) {
+    globalVar.getPhoneNumber({
+      success: (res) => {
+        const encryptedData = res.response
+        e = {
+          ...e,
+          detail: encryptedData,
+          res,
+        }
+        fn && fn(e)
+      },
+      fail: (res) => {
+        e = {
+          ...e,
+          detail: {},
+          res,
+        }
+        fn && fn(e)
+      },
+    })
+  },
+}

+ 827 - 0
__antmove/api/utils.js

@@ -0,0 +1,827 @@
+/* eslint-disable */
+
+const logUtils = require('./log.js')
+
+const hasProxy = typeof Proxy !== 'undefined'
+let _Proxy = function () {}
+
+if (hasProxy) {
+  _Proxy = Proxy
+}
+
+module.exports = {
+  ...logUtils,
+
+  nextUid(len = 8) {
+    return Math.random()
+      .toString(36)
+      .substr(len + 1)
+  },
+
+  parseSelector(sel) {
+    let ret = sel
+    if (sel.indexOf('>>>') !== -1) {
+      console.warn('支付宝不支持跨自定义组件的后代选择器,已降级')
+      const arr = sel.split('>>>')
+      ret = arr[arr.length - 1].trim()
+    }
+    return ret
+  },
+
+  /**
+   * defineGetter
+   */
+  defineGetter(obj = {}, descObj = {}, cb = () => {}) {
+    if (!hasProxy) {
+      return obj
+    }
+    return new _Proxy(obj, {
+      get(target, attr) {
+        if (
+          typeof attr === 'string' &&
+          descObj[attr] &&
+          descObj[attr].type === 0
+        ) {
+          cb && cb(target, attr)
+        }
+
+        return target[attr]
+      },
+    })
+  },
+
+  /**
+   * sourceObj : 要操作对象
+   * wxAttr: 微信key值
+   * alipayAttr: 支付宝key值
+   **/
+  objectMap(sourceObj = {}, wxAttr, alipayAttr) {
+    if (!hasProxy) {
+      Object.defineProperty(sourceObj, wxAttr, {
+        get() {
+          return sourceObj[alipayAttr]
+        },
+      })
+
+      return sourceObj
+    }
+    return new _Proxy(sourceObj, {
+      get(target, attr) {
+        if (attr === wxAttr) {
+          return target[alipayAttr]
+        }
+      },
+    })
+  },
+  // 类型转换
+  changeType(str) {
+    const hexA = new Array(0)
+    if (typeof attr === 'string') {
+      // 十六进制字符串转字节数组
+      let pos = 0
+      let len = str.length
+      if (len % 2 !== 0) {
+        return null
+      }
+      len /= 2
+      for (let i = 0; i < len; i++) {
+        const s = str.substr(pos, 2)
+        const v = parseInt(s, 16)
+        hexA.push(v)
+        pos += 2
+      }
+      return hexA
+    }
+  },
+  // https://github.com/wandergis/coordtransform/blob/master/index.js
+  gcj02towgs84(_lng, _lat) {
+    const lat = +_lat
+    const lng = +_lng
+    const ee = 0.00669342162296594323
+    const a = 6378245.0
+
+    if (out_of_china(lng, lat)) {
+      return [lng, lat]
+    } else {
+      let dlat = transformlat(lng - 105.0, lat - 35.0)
+      let dlng = transformlng(lng - 105.0, lat - 35.0)
+      const radlat = (lat / 180.0) * Math.PI
+      let magic = Math.sin(radlat)
+      magic = 1 - ee * magic * magic
+      const sqrtmagic = Math.sqrt(magic)
+      dlat = (dlat * 180.0) / (((a * (1 - ee)) / (magic * sqrtmagic)) * Math.PI)
+      dlng = (dlng * 180.0) / ((a / sqrtmagic) * Math.cos(radlat) * Math.PI)
+      const mglat = lat + dlat
+      const mglng = lng + dlng
+      return [lng * 2 - mglng, lat * 2 - mglat]
+    }
+  },
+
+  ab2hex(buffer) {
+    const hexArr = Array.prototype.map.call(new Uint8Array(buffer), (bit) => {
+      return `00${bit.toString(16)}`.slice(-2)
+    })
+    return hexArr.join('')
+  },
+
+  /**
+   * change attr for object
+   * replace attr by newAttr
+   */
+  changeObjAttr(obj = {}, attr, newAttr) {
+    if (obj[attr] !== undefined) {
+      obj[newAttr] = obj[attr]
+      delete obj[attr]
+    } else {
+      console.warn(`${attr} attribute is missing!`)
+    }
+
+    return obj
+  },
+  fnAppClass,
+  browserPath,
+  mapAuthSetting,
+}
+
+function out_of_china(lng, lat) {
+  // 纬度3.86~53.55,经度73.66~135.05
+  return !(lng > 73.66 && lng < 135.05 && lat > 3.86 && lat < 53.55)
+}
+
+function transformlat(lng, lat) {
+  let ret =
+    -100.0 +
+    2.0 * lng +
+    3.0 * lat +
+    0.2 * lat * lat +
+    0.1 * lng * lat +
+    0.2 * Math.sqrt(Math.abs(lng))
+  ret +=
+    ((20.0 * Math.sin(6.0 * lng * Math.PI) +
+      20.0 * Math.sin(2.0 * lng * Math.PI)) *
+      2.0) /
+    3.0
+  ret +=
+    ((20.0 * Math.sin(lat * Math.PI) + 40.0 * Math.sin((lat / 3.0) * Math.PI)) *
+      2.0) /
+    3.0
+  ret +=
+    ((160.0 * Math.sin((lat / 12.0) * Math.PI) +
+      320 * Math.sin((lat * Math.PI) / 30.0)) *
+      2.0) /
+    3.0
+  return ret
+}
+
+function transformlng(lng, lat) {
+  let ret =
+    300.0 +
+    lng +
+    2.0 * lat +
+    0.1 * lng * lng +
+    0.1 * lng * lat +
+    0.1 * Math.sqrt(Math.abs(lng))
+  ret +=
+    ((20.0 * Math.sin(6.0 * lng * Math.PI) +
+      20.0 * Math.sin(2.0 * lng * Math.PI)) *
+      2.0) /
+    3.0
+  ret +=
+    ((20.0 * Math.sin(lng * Math.PI) + 40.0 * Math.sin((lng / 3.0) * Math.PI)) *
+      2.0) /
+    3.0
+  ret +=
+    ((150.0 * Math.sin((lng / 12.0) * Math.PI) +
+      300.0 * Math.sin((lng / 30.0) * Math.PI)) *
+      2.0) /
+    3.0
+  return ret
+}
+
+function fnAppClass() {
+  const fn = {
+    $data: {},
+    add(key, cb = () => {}) {
+      fn.$data[key] = fn.$data[key] || []
+      fn.$data[key].push(cb)
+      return fn
+    },
+    insert(key, cb = () => {}) {
+      fn.$data[key] = fn.$data[key] || []
+      fn.$data[key].unshift(cb)
+    },
+    getFn(key) {
+      return fn.$data[key]
+    },
+    bind(key, ctx = {}) {
+      fn.$data[key] = fn.$data[key] || []
+      fn.add(key, ctx[key])
+      ctx[key] = function (...params) {
+        const self = this
+        fn.getFn(key).forEach((cb) => {
+          cb.apply(self, params)
+        })
+      }
+    },
+  }
+  return fn
+}
+
+function assertPath(path) {
+  if (typeof path !== 'string') {
+    throw new TypeError(
+      `Path must be a string. Received ${JSON.stringify(path)}`
+    )
+  }
+}
+
+// Resolves . and .. elements in a path with directory names
+function normalizeStringPosix(path, allowAboveRoot) {
+  let res = ''
+  let lastSegmentLength = 0
+  let lastSlash = -1
+  let dots = 0
+  let code
+  for (let i = 0; i <= path.length; ++i) {
+    if (i < path.length) {
+      code = path.charCodeAt(i)
+    } else if (code === 47 /* /*/) {
+      break
+    } else {
+      code = 47 /* /*/
+    }
+    if (code === 47 /* /*/) {
+      if (lastSlash === i - 1 || dots === 1) {
+        // NOOP
+      } else if (lastSlash !== i - 1 && dots === 2) {
+        if (
+          res.length < 2 ||
+          lastSegmentLength !== 2 ||
+          res.charCodeAt(res.length - 1) !== 46 /* .*/ ||
+          res.charCodeAt(res.length - 2) !== 46 /* .*/
+        ) {
+          if (res.length > 2) {
+            const lastSlashIndex = res.lastIndexOf('/')
+            if (lastSlashIndex !== res.length - 1) {
+              if (lastSlashIndex === -1) {
+                res = ''
+                lastSegmentLength = 0
+              } else {
+                res = res.slice(0, lastSlashIndex)
+                lastSegmentLength = res.length - 1 - res.lastIndexOf('/')
+              }
+              lastSlash = i
+              dots = 0
+              continue
+            }
+          } else if (res.length === 2 || res.length === 1) {
+            res = ''
+            lastSegmentLength = 0
+            lastSlash = i
+            dots = 0
+            continue
+          }
+        }
+        if (allowAboveRoot) {
+          if (res.length > 0) {
+            res += '/..'
+          } else {
+            res = '..'
+          }
+          lastSegmentLength = 2
+        }
+      } else {
+        if (res.length > 0) {
+          res += `/${path.slice(lastSlash + 1, i)}`
+        } else {
+          res = path.slice(lastSlash + 1, i)
+        }
+        lastSegmentLength = i - lastSlash - 1
+      }
+      lastSlash = i
+      dots = 0
+    } else if (code === 46 /* .*/ && dots !== -1) {
+      ++dots
+    } else {
+      dots = -1
+    }
+  }
+  return res
+}
+
+function _format(sep, pathObject) {
+  const dir = pathObject.dir || pathObject.root
+  const base =
+    pathObject.base || (pathObject.name || '') + (pathObject.ext || '')
+  if (!dir) {
+    return base
+  }
+  if (dir === pathObject.root) {
+    return dir + base
+  }
+  return dir + sep + base
+}
+
+const posix = {
+  // path.resolve([from ...], to)
+  resolve: function resolve(...args) {
+    let resolvedPath = ''
+    let resolvedAbsolute = false
+    let cwd
+
+    for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {
+      let path
+      if (i >= 0) {
+        path = args[i]
+      } else {
+        if (cwd === undefined) {
+          cwd = process.cwd()
+        }
+        path = cwd
+      }
+
+      assertPath(path)
+
+      // Skip empty entries
+      if (path.length === 0) {
+        continue
+      }
+
+      resolvedPath = `${path}/${resolvedPath}`
+      resolvedAbsolute = path.charCodeAt(0) === 47 /* /*/
+    }
+
+    // At this point the path should be resolved to a full absolute path, but
+    // handle relative paths to be safe (might happen when process.cwd() fails)
+
+    // Normalize the path
+    resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute)
+
+    if (resolvedAbsolute) {
+      if (resolvedPath.length > 0) {
+        return `/${resolvedPath}`
+      }
+      return '/'
+    } else if (resolvedPath.length > 0) {
+      return resolvedPath
+    }
+    return '.'
+  },
+
+  normalize: function normalize(path) {
+    assertPath(path)
+
+    if (path.length === 0) {
+      return '.'
+    }
+
+    const isAbsolute = path.charCodeAt(0) === 47 /* /*/
+    const trailingSeparator = path.charCodeAt(path.length - 1) === 47 /* /*/
+
+    // Normalize the path
+    path = normalizeStringPosix(path, !isAbsolute)
+
+    if (path.length === 0 && !isAbsolute) {
+      path = '.'
+    }
+    if (path.length > 0 && trailingSeparator) {
+      path += '/'
+    }
+
+    if (isAbsolute) {
+      return `/${path}`
+    }
+    return path
+  },
+
+  isAbsolute: function isAbsolute(path) {
+    assertPath(path)
+    return path.length > 0 && path.charCodeAt(0) === 47 /* /*/
+  },
+
+  join: function join(...p) {
+    if (p.length === 0) {
+      return '.'
+    }
+    let joined
+    for (let i = 0; i < p.length; ++i) {
+      const arg = p[i]
+      assertPath(arg)
+      if (arg.length > 0) {
+        if (joined === undefined) {
+          joined = arg
+        } else {
+          joined += `/${arg}`
+        }
+      }
+    }
+    if (joined === undefined) {
+      return '.'
+    }
+    return posix.normalize(joined)
+  },
+
+  relative: function relative(from, to) {
+    assertPath(from)
+    assertPath(to)
+
+    if (from === to) {
+      return ''
+    }
+
+    from = posix.resolve(from)
+    to = posix.resolve(to)
+
+    if (from === to) {
+      return ''
+    }
+
+    // Trim any leading backslashes
+    let fromStart = 1
+    for (; fromStart < from.length; ++fromStart) {
+      if (from.charCodeAt(fromStart) !== 47 /* /*/) {
+        break
+      }
+    }
+    const fromEnd = from.length
+    const fromLen = fromEnd - fromStart
+
+    // Trim any leading backslashes
+    let toStart = 1
+    for (; toStart < to.length; ++toStart) {
+      if (to.charCodeAt(toStart) !== 47 /* /*/) {
+        break
+      }
+    }
+    const toEnd = to.length
+    const toLen = toEnd - toStart
+
+    // Compare paths to find the longest common path from root
+    const length = fromLen < toLen ? fromLen : toLen
+    let lastCommonSep = -1
+    let i = 0
+    for (; i <= length; ++i) {
+      if (i === length) {
+        if (toLen > length) {
+          if (to.charCodeAt(toStart + i) === 47 /* /*/) {
+            // We get here if `from` is the exact base path for `to`.
+            // For example: from='/foo/bar'; to='/foo/bar/baz'
+            return to.slice(toStart + i + 1)
+          } else if (i === 0) {
+            // We get here if `from` is the root
+            // For example: from='/'; to='/foo'
+            return to.slice(toStart + i)
+          }
+        } else if (fromLen > length) {
+          if (from.charCodeAt(fromStart + i) === 47 /* /*/) {
+            // We get here if `to` is the exact base path for `from`.
+            // For example: from='/foo/bar/baz'; to='/foo/bar'
+            lastCommonSep = i
+          } else if (i === 0) {
+            // We get here if `to` is the root.
+            // For example: from='/foo'; to='/'
+            lastCommonSep = 0
+          }
+        }
+        break
+      }
+      const fromCode = from.charCodeAt(fromStart + i)
+      const toCode = to.charCodeAt(toStart + i)
+      if (fromCode !== toCode) {
+        break
+      } else if (fromCode === 47 /* /*/) {
+        lastCommonSep = i
+      }
+    }
+
+    let out = ''
+    // Generate the relative path based on the path difference between `to`
+    // and `from`
+    for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {
+      if (i === fromEnd || from.charCodeAt(i) === 47 /* /*/) {
+        if (out.length === 0) {
+          out += '..'
+        } else {
+          out += '/..'
+        }
+      }
+    }
+
+    // Lastly, append the rest of the destination (`to`) path that comes after
+    // the common path parts
+    if (out.length > 0) {
+      return out + to.slice(toStart + lastCommonSep)
+    }
+
+    toStart += lastCommonSep
+    if (to.charCodeAt(toStart) === 47 /* /*/) {
+      ++toStart
+    }
+    return to.slice(toStart)
+  },
+
+  _makeLong: function _makeLong(path) {
+    return path
+  },
+
+  dirname: function dirname(path) {
+    assertPath(path)
+    if (path.length === 0) {
+      return '.'
+    }
+    let code = path.charCodeAt(0)
+    const hasRoot = code === 47 /* /*/
+    let end = -1
+    let matchedSlash = true
+    for (let i = path.length - 1; i >= 1; --i) {
+      code = path.charCodeAt(i)
+      if (code === 47 /* /*/) {
+        if (!matchedSlash) {
+          end = i
+          break
+        }
+      } else {
+        // We saw the first non-path separator
+        matchedSlash = false
+      }
+    }
+
+    if (end === -1) {
+      return hasRoot ? '/' : '.'
+    }
+    if (hasRoot && end === 1) {
+      return '//'
+    }
+    return path.slice(0, end)
+  },
+
+  basename: function basename(path, ext) {
+    if (ext !== undefined && typeof ext !== 'string') {
+      throw new TypeError('"ext" argument must be a string')
+    }
+    assertPath(path)
+
+    let start = 0
+    let end = -1
+    let matchedSlash = true
+    let i
+
+    if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {
+      if (ext.length === path.length && ext === path) {
+        return ''
+      }
+      let extIdx = ext.length - 1
+      let firstNonSlashEnd = -1
+      for (i = path.length - 1; i >= 0; --i) {
+        const code = path.charCodeAt(i)
+        if (code === 47 /* /*/) {
+          // If we reached a path separator that was not part of a set of path
+          // separators at the end of the string, stop now
+          if (!matchedSlash) {
+            start = i + 1
+            break
+          }
+        } else {
+          if (firstNonSlashEnd === -1) {
+            // We saw the first non-path separator, remember this index in case
+            // we need it if the extension ends up not matching
+            matchedSlash = false
+            firstNonSlashEnd = i + 1
+          }
+          if (extIdx >= 0) {
+            // Try to match the explicit extension
+            if (code === ext.charCodeAt(extIdx)) {
+              if (--extIdx === -1) {
+                // We matched the extension, so mark this as the end of our path
+                // component
+                end = i
+              }
+            } else {
+              // Extension does not match, so our result is the entire path
+              // component
+              extIdx = -1
+              end = firstNonSlashEnd
+            }
+          }
+        }
+      }
+
+      if (start === end) {
+        end = firstNonSlashEnd
+      } else if (end === -1) {
+        end = path.length
+      }
+      return path.slice(start, end)
+    }
+    for (i = path.length - 1; i >= 0; --i) {
+      if (path.charCodeAt(i) === 47 /* /*/) {
+        // If we reached a path separator that was not part of a set of path
+        // separators at the end of the string, stop now
+        if (!matchedSlash) {
+          start = i + 1
+          break
+        }
+      } else if (end === -1) {
+        // We saw the first non-path separator, mark this as the end of our
+        // path component
+        matchedSlash = false
+        end = i + 1
+      }
+    }
+
+    if (end === -1) {
+      return ''
+    }
+    return path.slice(start, end)
+  },
+
+  extname: function extname(path) {
+    assertPath(path)
+    let startDot = -1
+    let startPart = 0
+    let end = -1
+    let matchedSlash = true
+    // Track the state of characters (if any) we see before our first dot and
+    // after any path separator we find
+    let preDotState = 0
+    for (let i = path.length - 1; i >= 0; --i) {
+      const code = path.charCodeAt(i)
+      if (code === 47 /* /*/) {
+        // If we reached a path separator that was not part of a set of path
+        // separators at the end of the string, stop now
+        if (!matchedSlash) {
+          startPart = i + 1
+          break
+        }
+        continue
+      }
+      if (end === -1) {
+        // We saw the first non-path separator, mark this as the end of our
+        // extension
+        matchedSlash = false
+        end = i + 1
+      }
+      if (code === 46 /* .*/) {
+        // If this is our first dot, mark it as the start of our extension
+        if (startDot === -1) {
+          startDot = i
+        } else if (preDotState !== 1) {
+          preDotState = 1
+        }
+      } else if (startDot !== -1) {
+        // We saw a non-dot and non-path separator before our dot, so we should
+        // have a good chance at having a non-empty extension
+        preDotState = -1
+      }
+    }
+
+    if (
+      startDot === -1 ||
+      end === -1 ||
+      // We saw a non-dot character immediately before the dot
+      preDotState === 0 ||
+      // The (right-most) trimmed path component is exactly '..'
+      (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)
+    ) {
+      return ''
+    }
+    return path.slice(startDot, end)
+  },
+
+  format: function format(pathObject) {
+    if (pathObject === null || typeof pathObject !== 'object') {
+      throw new TypeError(
+        `The "pathObject" argument must be of type Object. Received type ${typeof pathObject}`
+      )
+    }
+    return _format('/', pathObject)
+  },
+
+  parse: function parse(path) {
+    assertPath(path)
+
+    const ret = { root: '', dir: '', base: '', ext: '', name: '' }
+    if (path.length === 0) {
+      return ret
+    }
+    let code = path.charCodeAt(0)
+    const isAbsolute = code === 47 /* /*/
+    let start
+    if (isAbsolute) {
+      ret.root = '/'
+      start = 1
+    } else {
+      start = 0
+    }
+    let startDot = -1
+    let startPart = 0
+    let end = -1
+    let matchedSlash = true
+    let i = path.length - 1
+
+    // Track the state of characters (if any) we see before our first dot and
+    // after any path separator we find
+    let preDotState = 0
+
+    // Get non-dir info
+    for (; i >= start; --i) {
+      code = path.charCodeAt(i)
+      if (code === 47 /* /*/) {
+        // If we reached a path separator that was not part of a set of path
+        // separators at the end of the string, stop now
+        if (!matchedSlash) {
+          startPart = i + 1
+          break
+        }
+        continue
+      }
+      if (end === -1) {
+        // We saw the first non-path separator, mark this as the end of our
+        // extension
+        matchedSlash = false
+        end = i + 1
+      }
+      if (code === 46 /* .*/) {
+        // If this is our first dot, mark it as the start of our extension
+        if (startDot === -1) {
+          startDot = i
+        } else if (preDotState !== 1) {
+          preDotState = 1
+        }
+      } else if (startDot !== -1) {
+        // We saw a non-dot and non-path separator before our dot, so we should
+        // have a good chance at having a non-empty extension
+        preDotState = -1
+      }
+    }
+
+    if (
+      startDot === -1 ||
+      end === -1 ||
+      // We saw a non-dot character immediately before the dot
+      preDotState === 0 ||
+      // The (right-most) trimmed path component is exactly '..'
+      (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)
+    ) {
+      if (end !== -1) {
+        if (startPart === 0 && isAbsolute) {
+          ret.base = path.slice(1, end)
+          ret.name = path.slice(1, end)
+        } else {
+          ret.base = path.slice(startPart, end)
+          ret.name = path.slice(startPart, end)
+        }
+      }
+    } else {
+      if (startPart === 0 && isAbsolute) {
+        ret.name = path.slice(1, startDot)
+        ret.base = path.slice(1, end)
+      } else {
+        ret.name = path.slice(startPart, startDot)
+        ret.base = path.slice(startPart, end)
+      }
+      ret.ext = path.slice(startDot, end)
+    }
+
+    if (startPart > 0) {
+      ret.dir = path.slice(0, startPart - 1)
+    } else if (isAbsolute) {
+      ret.dir = '/'
+    }
+
+    return ret
+  },
+
+  sep: '/',
+  delimiter: ':',
+  win32: null,
+  posix: null,
+}
+
+posix.posix = posix
+
+function browserPath() {
+  return posix
+}
+
+function mapAuthSetting(obj) {
+  const keys = [
+    ['scope.userLocation', 'location'],
+    ['scope.writePhotosAlbum', 'album'],
+    ['scope.camera', 'camera'],
+    ['scope.userInfo', 'userInfo'],
+    ['scope.address', 'aliaddress'],
+    ['scope.werun', 'alipaysports'],
+  ]
+
+  const authSetting = {}
+
+  keys.forEach((item) => {
+    const value = obj[item[1]]
+    if (typeof value !== 'undefined') {
+      authSetting[item[0]] = value
+    }
+  })
+
+  return authSetting
+}

+ 129 - 0
__antmove/component/btn/btn.acss

@@ -0,0 +1,129 @@
+.btn_box{
+    position: relative; 
+}
+.mini {
+    display: inline-block
+}
+.styleV2Btn button{
+    padding-left: 24px;
+    padding-right: 24px;
+    font-weight: 700;
+}
+.styleV2Btn.active button:active{
+    background-color: #dedede;
+}
+.size_mini{
+    display: inline-block;
+    line-height: 2.3;
+    padding: 0 1.34em;
+    font-size: 13px;
+    height: auto;
+}
+.styleV2Btn .size_default{
+    width: 184px;
+    margin-left: auto;
+    margin-right: auto;
+}
+.styleV2Btn .type_primary{
+    background-color: #07c160;
+    color:#fff;
+    border-color: #07c160;
+}
+.styleV2Btn.active .type_primary:active{
+    background-color:rgb(28,172,89);
+}
+.styleV2Btn .type_warn{
+    color: #fa5151 ;
+    background-color:#f2f2f2;
+}
+.styleV2Btn .type_default{
+    background-color: #f2f2f2;
+    color:#06ae56 ;
+}
+.plain.type_warn{
+    color: #e64340;
+    background-color: #fff;
+    border-color: #e64340;
+}
+
+.styleV2Btn .plain.type_primary{
+    color: #06ae56 ;
+    background-color: #fff;
+}
+
+.styleV2Btn .plain.type_default{
+    color: #353535 ;
+    border-color:  #353535;
+    background-color: transparent;
+}
+
+.styleV2Btn.active .plain:active {
+    background-color: #dedede;
+}
+.active .plain.type_warn:active{
+    background-color: #fff;
+    opacity: 0.6;
+}
+
+.disabled{
+    opacity: 0.6
+}
+
+.btn_mark,.btn_catch{
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%
+}
+.active .btn_catch:active {
+  background-color: rgba(255,255,255,.3)
+}
+.hovers{
+    background-color: blue;
+}
+/* 旧版本样式 */
+.notStyleV2Btn button{
+    font-weight: 400;
+}
+
+.notStyleV2Btn .type_primary{
+    background-color: #1aad19;
+    color:#fff;
+}
+.notStyleV2Btn.active .type_primary:active{
+    background-color: rgb(33,153,35);
+    color:rgb(166,214,167);
+}
+.notStyleV2Btn .plain.type_primary{
+    color: #1aad19;
+    background-color: #fff;
+    border-color: #1aad19;
+}
+.notStyleV2Btn .plain.type_default{
+    background-color: #fff;
+    border-color: #353535;
+}
+.notStyleV2Btn.active .type_default:active{
+    background-color: rgb(221,221,221);
+    color:rgb(154,154,154);
+}
+.notStyleV2Btn .plain.type_warn{
+    color: #e64340;
+    border-color: #e64340;
+    background-color: #fff;
+}
+.notStyleV2Btn.active .plain:active, .notStyleV2Btn.active .plain.type_warn:active{
+    background-color: #fff;
+    opacity: 0.6;
+}
+.notStyleV2Btn .type_warn{
+    background-color: #e64340;
+    color: #fff;
+}
+.notStyleV2Btn.active .type_warn:active{
+    background-color: rgb(204,61,61);
+    color: rgb(215,117,117);
+}
+
+

+ 9 - 0
__antmove/component/btn/btn.axml

@@ -0,0 +1,9 @@
+<view class="btn_box {{antmoveClass}} {{size}} {{disabled?'disabled':''}} {{styleV2 ? 'styleV2Btn' : 'notStyleV2Btn'}} {{hoverClass === 'none' ? '' : 'active'}}"  >
+    <button style="{{style}}" class="base_btn size_{{size}} type_{{type}}  {{plain?'plain':''}} {{className}}"  loading="{{loading}}" formType="{{formType}}" open-type="{{opentype}}"  app-parameter="{{appParameter}}" scope='{{scope}}' onGetAuthorize="getAuthorize" onError='onError' onTap="btnOnTap" hover-class='{{hoverClass}}'> <slot></slot> </button>
+    <view class="btn_mark" a:if="{{catchTap}}" catchTap="btnOnTap"></view>
+    <view class="btn_mark" a:if="{{disabled}}" catchTap="stopEvent"></view>
+</view>
+
+
+
+

+ 314 - 0
__antmove/component/btn/btn.js

@@ -0,0 +1,314 @@
+const utils = require('../../api/utils')
+const processDataSet = require('../utils/processDataSet')
+
+Component({
+  data: {
+    isUpdating: false,
+    scope: '',
+    getAuthorize: '',
+    styleV2: my.styleV2,
+  },
+  props: {
+    size: 'default',
+    type: '',
+    plain: false,
+    disabled: false,
+    loading: false,
+    'form-type': '',
+    'open-type': '',
+    'app-parameter': '',
+    'hover-class': 'button-hover',
+    'hover-stop-propagation': false,
+    'hover-start-time': false,
+    className: '',
+    onTap: () => {},
+    onGetUserInfo: '',
+    onGetPhoneNumber: '',
+  },
+  onInit() {
+    this.updateData()
+  },
+  deriveDataFromProps(nextProps) {
+    const {
+      size,
+      type,
+      plain,
+      disabled,
+      loading,
+      formType,
+      openType,
+      hoverClass,
+      hoverStopPropagation,
+      hoverStartTime,
+      appParameter,
+    } = nextProps
+    const opentype = this.getOpenType(openType)
+    const scope = this.getScope(openType)
+    const params = {
+      size,
+      type,
+      plain,
+      disabled,
+      loading,
+      formType,
+      opentype,
+      scope,
+      hoverClass,
+      hoverStopPropagation,
+      hoverStartTime,
+      appParameter,
+    }
+    Object.keys(params).forEach(
+      (key) => params[key] === undefined && delete params[key],
+    )
+    this.setData(params)
+  },
+  methods: {
+    updateData() {
+      if (this.data.isUpdating) {
+        return
+      }
+      this.setData({
+        isUpdating: true,
+      })
+      for (const key in this.props) {
+        if (this.props.hasOwnProperty(key)) {
+          typeof this.props[key] === 'string'
+            && (this.props[key] = this.props[key].replace(/(^\s*)|(\s*$)/g, ''))
+        }
+      }
+      const {
+        size,
+        type,
+        plain,
+        disabled,
+        loading,
+        formType,
+        hoverClass,
+        hoverStopPropagation,
+        hoverStartTime,
+        appParameter,
+        openType,
+      } = this.props
+      this.getSystem(() => {
+        const opentype = this.getOpenType(openType)
+        const scope = this.getScope(openType)
+        this.setData({
+          isUpdating: false,
+          size,
+          type,
+          plain,
+          disabled,
+          loading,
+          formType,
+          opentype,
+          hoverClass,
+          hoverStopPropagation,
+          hoverStartTime,
+          appParameter,
+          scope,
+        })
+      })
+    },
+    getSystem(cb) {
+      const that = this
+      my.getSystemInfo({
+        success(res) {
+          let app = ''
+          if (res.app && res.app === 'amap') {
+            app = 'amap'
+          } else {
+            app = 'alipay'
+          }
+          that.setData({
+            app,
+          })
+          cb()
+        },
+      })
+    },
+    getOpenType(opentype) {
+      const transformList = {
+        getPhoneNumber: 'getAuthorize',
+        getUserInfo: 'getAuthorize',
+      }
+      if (transformList[opentype]) {
+        return transformList[opentype]
+      }
+      let allowList = ['share', 'launchApp', 'getAuthorize', 'openSetting']
+      if (this.data.app === 'amap') {
+        allowList = ['share', 'getAuthorize', 'openSetting']
+      }
+      if (opentype) {
+        if (allowList.indexOf(opentype) !== -1) {
+          return opentype
+        } else {
+          utils.warn(`小程序open-type值不支持${opentype}`, {
+            apiName: `button/open-type/${opentype}`,
+            errorType: 0,
+            type: 'component',
+          })
+        }
+      }
+      return ''
+    },
+    getScope(opentype) {
+      const scopeMap = {
+        getPhoneNumber: 'phoneNumber',
+        getUserInfo: 'userInfo',
+      }
+      return scopeMap[opentype] || ''
+    },
+    onError(err) {
+      if (this.props.onError === 'function') {
+        this.props.onError(err)
+      }
+    },
+    getAuthorize() {
+      const that = this
+      const resObj = {}
+      if (
+        this.data.opentype === 'getAuthorize'
+        && this.data.scope === 'phoneNumber'
+      ) {
+        my.getPhoneNumber({
+          success: (res) => {
+            if (typeof that.props.onGetPhoneNumber === 'function') {
+              resObj.detail = res
+              resObj.type = 'getphonenumber'
+              that.props.onGetPhoneNumber(resObj)
+            }
+          },
+          fail: (res) => {
+            if (typeof that.props.onGetPhoneNumber === 'function') {
+              resObj.detail = res
+              resObj.type = 'getphonenumber'
+              that.props.onGetPhoneNumber(resObj)
+            }
+          },
+        })
+      }
+      if (
+        this.data.opentype === 'getAuthorize'
+        && this.data.scope === 'userInfo'
+      ) {
+        my.getOpenUserInfo({
+          success: (res) => {
+            if (typeof that.props.onGetUserInfo === 'function') {
+              const _res = JSON.parse(res.response).response
+              _res.gender && _res.gender === 'm'
+                ? (_res.gender = 1)
+                : (_res.gender = 2)
+              _res.avatarUrl = _res.avatar
+              delete _res.avatar
+              resObj.detail = {}
+              resObj.detail.userInfo = _res
+              resObj.type = 'getuserinfo'
+              that.props.onGetUserInfo(resObj)
+            }
+          },
+          fail: (res) => {
+            if (typeof that.props.onGetUserInfo === 'function') {
+              resObj.detail = res
+              resObj.type = 'getuserinfo'
+              that.props.onGetUserInfo(resObj)
+            }
+          },
+        })
+      }
+    },
+    stopEvent() {},
+    btnOnTap(e) {
+      const that = this
+      const tapEvent = processDataSet(e, this.props)
+
+      if (this.props.openType === 'openSetting') {
+        my.openSetting({
+          success(res) {
+            if (typeof that.props.onOpenSetting === 'function') {
+              that.props.onOpenSetting({
+                ...tapEvent,
+                type: 'opensetting',
+                detail: {
+                  authSetting: utils.mapAuthSetting(res.authSetting),
+                },
+              })
+            }
+          },
+        })
+      }
+
+      this.props.catchTap && this.props.catchTap(tapEvent)
+      this.props.onTap && this.props.onTap(tapEvent)
+    },
+    getPhone(e) {
+      const eve = { ...e }
+      my.getPhoneNumber({
+        success: (res) => {
+          if (typeof res.response === 'string') {
+            const response = JSON.parse(res.response)
+            if (response.response.code === '40001') {
+              utils.warn('请去小程序开发管理后台的功能列表中添加获取电话功能', {
+                apiName: 'button/bindgetphonenumber',
+                errorType: 1,
+                type: 'component',
+              })
+            }
+            return false
+          }
+          eve.detail = res.response
+          if (typeof this.props.onGetPhoneNumber === 'function') {
+            this.props.onGetPhoneNumber(eve)
+          }
+        },
+        fail(err) {
+          throw err
+        },
+      })
+    },
+    getUserInfo(e) {
+      const that = this
+      // 获取用户信息
+      const eve = { ...e }
+      my.getAuthCode({
+        scopes: 'auth_user',
+        success: () => {
+          my.getOpenUserInfo({
+            success: (userInfo) => {
+              eve.detail = {
+                userInfo: {},
+                rawData: '',
+              }
+              if (typeof userInfo.response === 'string') {
+                const response = JSON.parse(userInfo.response)
+                if (response.response.code === '40006') {
+                  utils.warn(
+                    '请去小程序开发管理后台的功能列表中添加会员信息功能',
+                    {
+                      apiName: 'button/bindgetuserinfo',
+                      errorType: 1,
+                      type: 'component',
+                    },
+                  )
+                }
+                return false
+              }
+              eve.detail.userInfo = { ...userInfo.response }
+              eve.detail.userInfo.avatarUrl = eve.detail.userInfo.avatar
+              delete eve.detail.userInfo.avatar
+              eve.detail.rawData = JSON.stringify(eve.detail.userInfo)
+
+              if (typeof that.props.onGetUserInfo === 'function') {
+                that.props.onGetUserInfo(eve)
+              }
+            },
+            fail(err) {
+              throw err
+            },
+          })
+        },
+      })
+    },
+
+  },
+})

+ 3 - 0
__antmove/component/btn/btn.json

@@ -0,0 +1,3 @@
+{
+    "component": true
+}

+ 104 - 0
__antmove/component/classSubdirectory/app.js

@@ -0,0 +1,104 @@
+const utils = require('../../api/utils')
+
+const { warnLife } = utils
+const { setIfWatch } = require('./utils')
+
+const getUrl = function() {
+  const pages = getCurrentPages()
+  const url = pages[pages.length - 1].route
+  const _arr = url.split('/')
+  const _name = _arr[_arr.length - 1]
+  my.setStorageSync({
+    key: '_pageMsg',
+    data: {
+      pageName: _name,
+      pagePath: url,
+    },
+  })
+}
+
+module.exports = {
+  processTransformationApp(_opts, options) {
+    _opts = Object.assign(_opts, options)
+    _opts.onLaunch = function(res) {
+      if (!my.canIUse('component2')) { console.warn('《建议用户开启 component2 模式,详情:IDE 中的 详情 > 项目配置 中,勾选 component2》') }
+      my.removeStorageSync({
+        key: 'logInfo',
+      })
+      my.removeStorageSync({
+        key: '_pageMsg',
+      })
+      getUrl()
+      let body = {}
+      function pre(params = {}) {
+        return utils.defineGetter(params, body.params, (obj, prop) => {
+          warnLife(`onLaunch's return value is not support ${prop} attribute!`, `onLaunch/${prop}`)
+        })
+      }
+      if (options.onLaunch) {
+        body = {
+          params: {
+            scene: {
+              type: 0,
+              desc: 'missing',
+            },
+            shareTicket: {
+              type: 0,
+              desc: 'missing',
+            },
+          },
+        }
+        res = pre(res)
+
+        if (typeof options.data === 'function') {
+          options.data = options.data()
+        }
+
+        options.onLaunch.call(this, res)
+      }
+      if (options.onPageNotFound) {
+        warnLife('There is no onPageNotFound life cycle', 'onPageNotFound')
+      }
+      if (options.onPageNotFound) {
+        warnLife('There is no onPageNotFound life cycle', 'onPageNotFound')
+      }
+    }
+    _opts.onShow = function(res) {
+      setIfWatch(true)
+      let body = {}
+      function pre(params = {}) {
+        return utils.defineGetter(params, body.params, (obj, prop) => {
+          warnLife(`onShow's return value is not support ${prop} attribute!`, `onShow/${prop}`)
+        })
+      }
+      if (options.onShow) {
+        body = {
+          params: {
+            scene: {
+              type: 0,
+              desc: 'missing',
+            },
+            shareTicket: {
+              type: 0,
+              desc: 'missing',
+            },
+          },
+        }
+        res = pre(res)
+        options.onShow.call(this, res)
+      }
+    }
+    _opts.onHide = function() {
+      setIfWatch(false)
+      if (options.onHide) {
+        warnLife('', 'app/onHide')
+        options.onHide.call(this)
+      }
+    }
+    if (options.onError) {
+      _opts.onError = function(...args) {
+        options.onError.apply(this, args)
+      }
+    }
+  },
+}

+ 411 - 0
__antmove/component/classSubdirectory/component.js

@@ -0,0 +1,411 @@
+const utils = require('../../api/utils')
+
+const { warnLife, fnAppClass } = utils
+const Relations = require('../../api/relations')
+const config = require('../../api/config.js')
+const {
+  createSelectorQuery,
+  createIntersectionObserver,
+} = require('../../api/my')
+const {
+  getUrl,
+  updateData,
+  processRelationPath,
+  _relationNode,
+  findRelationNode,
+  compatibleLifetime,
+  collectObserver,
+  collectObservers,
+  processTriggerEvent,
+  observerHandle,
+  handleProps,
+  handleExternalClasses,
+  handleAfterInit,
+  mergeOptions,
+  copy,
+  nextUid,
+} = require('../utils')
+const SelectComponent = require('./selectComponent')
+const processRelationHandle = require('./processRelation')
+const createNode = require('./relation')
+const { antmoveAction } = require('./utils')
+
+function getInfo(key, obj) {
+  let val = {}
+  Object.keys(obj).forEach((item) => {
+    if (key === item || key.indexOf(item) !== -1) {
+      val = obj[item]
+    }
+  })
+  return val
+}
+
+function processRelations(ctx, relationInfo = {}) {
+  let route = ctx.is
+  route = route.replace(/\/node_modules\/[a-z-]+\/[a-z-]+/, '')
+  if (route[0] === '/') {
+    route = route.substring(1)
+  }
+  const info = getInfo(route, relationInfo)
+  if (info) {
+    processRelationHandle(info, (node) => {
+      if (node.$id === 'saveChildRef0') {
+        ctx[node.$id] = function() {}
+        node.$index = 0
+        node.$route = route
+        createNode.call(ctx, ctx, null, node)
+        return false
+      }
+      ctx[node.$id] = function(ref) {
+        ctx.$antmove = ctx.$antmove || {}
+        if (ctx.$antmove[node.$id] === undefined) {
+          ctx.$antmove[node.$id] = 0
+        } else {
+          ctx.$antmove[node.$id] += 1
+        }
+        this.selectComponentApp.preProcesscomponents(ref)
+        node.$index = ctx.$antmove[node.$id]
+        node.$route = route
+        createNode.call(ctx, ref, null, node)
+      }
+    })
+  } else {
+    console.warn('Missing nodes relation of ', route)
+  }
+}
+
+function handleRelations() {
+  if (this.props.theRelations) {
+    Object.keys(this.props.theRelations).forEach((relation) => {
+      const _p = processRelationPath(this, relation)
+      const relationInfo = this.props.theRelations[relation]
+      let nodes = null
+
+      if (relationInfo.type === 'child' || relationInfo.type === 'descendant') {
+        return false
+      }
+      nodes = findRelationNode(this.$node, _p, relationInfo.type, true)
+      if (!nodes || nodes[0] === undefined) {
+        return false
+      }
+
+      nodes.forEach((n) => {
+        if (!n) {
+          // console.error('wrong relation reference of ', relationInfo);
+          // console.error('from: ', this.$node.$self.is, 'to: ', _p);
+          return false
+        }
+        _relationNode.call(this, n, {
+          relationInfo,
+          _p,
+          relation,
+        })
+      })
+    })
+  }
+}
+
+function processObservers(observersObj, options, param) {
+  if (options.observers) {
+    collectObservers.call(this, observersObj, options, param)
+  }
+}
+
+function processInit() {
+  getUrl()
+}
+
+function processIntersectionObserver(context) {
+  context.createIntersectionObserver = function(...p) {
+    return createIntersectionObserver.fn(...p)
+  }
+}
+
+/**
+ *
+ * @param {*} behavior
+ * @param {*} _opts
+ * @param {*} mixins
+ */
+
+module.exports = {
+  processTransformationComponent(_opts, options) {
+    const fnApp = fnAppClass()
+    options.properties = options.properties || {}
+    const behaviors = options.behaviors || []
+    const mixins = options.mixins || []
+    const _export = options.export || ''
+    delete options.behaviors
+    delete options.mixins
+    const retMixins = {}
+
+    _opts.observerObj = {}
+    _opts.observersObj = {}
+    _opts.behaviorsArr = []
+
+    processBehavior(retMixins, behaviors, _opts.behaviorsArr)
+    processBehavior(retMixins, mixins, _opts.behaviorsArr)
+    mergeOptions(retMixins, options)
+    processBehaviorId(behaviors)
+    processBehaviorId(mixins)
+
+    Object.keys(options).forEach((key) => {
+      _opts[key] = options[key]
+    })
+
+    handleProps(_opts)
+    handleExternalClasses(_opts)
+
+    const _life = compatibleLifetime(options)
+    if (options.properties) {
+      collectObserver(_opts.observerObj, options.properties, options)
+    }
+
+    if (!_opts.methods) {
+      _opts.methods = {}
+    }
+
+    _opts.methods.antmoveAction = antmoveAction
+
+    /**
+     * 处理组件所在的页面尺寸变化时执行
+     */
+    if (_opts.pageLifetimes && _opts.pageLifetimes.resize) {
+      _opts.methods.antmovePageLifetimes = function(e) {
+        return _opts.pageLifetimes.resize(e)
+      }
+    }
+
+    const didMount = function() {
+      _life.error && warnLife('There is no error life cycle', 'error')
+      _life.move && warnLife('There is no moved life cycle', 'moved')
+      _life.pageLifetimes
+        && warnLife(
+          'There is no page life cycle where the component resides,including(show,hide,resize)',
+          'pageLifetimes',
+        )
+      this.props.genericSelectable
+        && warnLife('generic:selectable is Unsupported', 'generic')
+
+      // process relations, get relation ast
+      const relationAst = createNode.call(this, null, null, null, null, true)
+        .mountedHandles
+      relationAst.push(() => {
+        handleRelations.call(this)
+      })
+    }
+    fnApp.add('onInit', function() {
+      this.onPageReady = function(p) {
+        _opts.onPageReady && _opts.onPageReady.call(this, p)
+      }
+    })
+
+    fnApp.add('deriveDataFromProps', () => {})
+
+    fnApp.add('didMount', didMount)
+    if (_opts.lifetimes && _opts.lifetimes.created) {
+      fnApp.add('onInit', _opts.lifetimes.created)
+    } else {
+      fnApp.add('onInit', _opts.created)
+    }
+    fnApp.insert('onInit', function() {
+      this.__wxExparserNodeId__ = nextUid()
+      processIntersectionObserver(this)
+      this.createSelectorQuery = function() {
+        if (config.env !== 'production') {
+          console.warn(
+            '支付宝createSelectorQuery不支持限定选择器的选择范围,如使用,请保证对应选择器使用的唯一性',
+          )
+        }
+        return createSelectorQuery.fn()
+      }
+      for (const method in this) {
+        if (typeof this[method] === 'function') {
+          this[method] = this[method].bind(this)
+        }
+      }
+      this.getRelationNodes = function() {
+        return []
+      }
+      processComponentExport(_export, behaviors, this)
+      this.selectComponentApp = new SelectComponent(this)
+
+      this.properties = {
+        ..._opts.properties,
+      }
+      processInit.call(this, _opts, options, _life, fnApp)
+      testBehaviors(behaviors)
+      updateData.call(this)
+      processRelations(this, Relations)
+      this.selectComponentApp.connect()
+      this.selectOwnerComponent = processSelectOwnerComponent.bind(this)
+      this.getPageId = processGetPageId.bind(this)
+      addAntmoveData.call(this)
+      if (typeof this.triggerEvent !== 'function') {
+        processTriggerEvent.call(this)
+      }
+      processObservers.call(this, _opts.observersObj, options, _opts)
+      observerHandle(_opts.observerObj, _opts, this, true)
+    })
+    fnApp.bind('onInit', _opts)
+    if (_opts.lifetimes && _opts.lifetimes.attached) {
+      fnApp.add('didMount', _opts.lifetimes.attached)
+    } else {
+      fnApp.add('didMount', _opts.attached)
+    }
+    if (_opts.pageLifetimes && _opts.pageLifetimes.show) {
+      fnApp.add('didMount', _opts.pageLifetimes.show)
+    }
+
+    fnApp.add('didMount', _opts.ready || (_opts.lifetimes && _opts.lifetimes.ready))
+
+    const didUpdate = function(...param) {
+      updateData.call(this, param)
+      processObservers.call(
+        this,
+        _opts.observersObj,
+        options,
+        this.$antmove._data,
+      )
+      observerHandle(_opts.observerObj, this.$antmove._data, this)
+      addAntmoveData.call(this)
+    }
+    fnApp.add('didUpdate', didUpdate)
+    fnApp.add('didUpdate', function() {
+      handleAfterInit.call(this)
+    })
+
+    fnApp.bind('deriveDataFromProps', _opts)
+    fnApp.bind('didUpdate', _opts)
+    fnApp.bind('didMount', _opts)
+    if (_opts.lifetimes && _opts.lifetimes.detached) {
+      fnApp.add('didUnmount', _opts.lifetimes.detached)
+    } else {
+      fnApp.add('didUnmount', options.detached)
+    }
+    fnApp.add('didUnmount', function() {
+      // todo: 暂时这样处理使其不报错
+      if (this.$node && this.$node.$parent) {
+        this.$node.$parent.removeChild(this.$node)
+        const refId = this.$node.$relationNode.$id
+        this.$antmove[refId]--
+      }
+    })
+    fnApp.bind('didUnmount', _opts)
+  },
+}
+
+function addAntmoveData() {
+  const _data = [{}, {}]
+  const ctx = this
+  const _props = {}
+  for (const i in ctx.properties) {
+    if (ctx.properties.hasOwnProperty(i)) {
+      _props[i] = ctx.data[i]
+    }
+  }
+  _data[0] = copy(_props)
+  _data[1] = copy(ctx.data)
+  this.$antmove = this.$antmove || {}
+  this.$antmove._data = _data
+}
+
+/**
+ * selectOwnerComponent
+ */
+function processSelectOwnerComponent() {
+  const node = this.$node
+  if (node && node.$parent && node.$parent.$self) {
+    return node.$parent.$self
+  }
+  return {}
+}
+
+/**
+ * getPageId
+ */
+
+function processGetPageId() {
+  if (this.$page) {
+    return `pageId:${this.$page.$id}`
+  }
+  return 'pageId: undefined'
+}
+
+/**
+ * behavior
+ */
+function processBehavior(_opts = {}, opts, $behaviors) {
+  const self = this
+  if (Array.isArray(opts)) {
+    opts.forEach((item) => {
+      if (
+        typeof item === 'object'
+        && ($behaviors.indexOf(item.$id) === -1 || item.$id === undefined)
+      ) {
+        $behaviors.push(item.$id)
+        _process.call(self, _opts, item)
+      }
+    })
+  } else if (typeof opts === 'object' && $behaviors.indexOf(opts.$id) === -1) {
+    $behaviors.push(opts.$id)
+    _process.call(self, _opts, opts)
+  }
+  function _process(__opts = {}, opt = {}) {
+    if (opt.behaviors) {
+      processBehavior.call(self, __opts, opt.behaviors, $behaviors)
+      delete opt.behaviors
+    }
+
+    if (opt.mixins) {
+      processBehavior(__opts, opt.mixins, $behaviors)
+      delete opt.mixins
+    }
+    mergeOptions(opt, __opts)
+  }
+}
+
+function processBehaviorId(behavior) {
+  if (Array.isArray(behavior)) {
+    behavior.forEach((item) => {
+      if (typeof item === 'object' && item.$id) {
+        delete item.$id
+      }
+    })
+  } else if (typeof behavior === 'object' && behavior.$id) {
+    delete behavior.$id
+  }
+}
+
+function processComponentExport(_export, behaviors, self) {
+  if (typeof _export !== 'function') {
+    return
+  }
+  if (Array.isArray(behaviors)) {
+    behaviors.forEach((bhv) => {
+      if (bhv === 'wx://component-export') {
+        self._this = _export()
+      }
+    })
+  } else if (behaviors === 'wx://component-export') {
+    self._this = _export()
+  }
+}
+
+function testBehaviors(behaviors) {
+  if (Array.isArray(behaviors)) {
+    behaviors.forEach((bhv) => {
+      if (bhv === 'wx://form-field') {
+        warnLife(
+          'Wx://form-field in built-in behavior is not supported',
+          'behavior/form-field',
+        )
+      }
+    })
+  } else if (behaviors === 'wx://form-field') {
+    warnLife(
+      'Wx://form-field in built-in behavior is not supported',
+      'behavior/form-field',
+    )
+  }
+}

+ 156 - 0
__antmove/component/classSubdirectory/page.js

@@ -0,0 +1,156 @@
+
+const config = require('../../api/config')
+const Relations = require('../../api/relations')
+const {
+  watchShakes,
+  getUrl,
+} = require('../utils')
+const createNode = require('./relation')
+const processRelationHandle = require('./processRelation')
+const { connectNodes, antmoveAction } = require('./utils')
+const SelectComponent = require('./selectComponent')
+
+
+module.exports = {
+  processTransformationPage(_opts, options) {
+    _opts = Object.assign(_opts, options)
+
+    _opts.onLoad = function(res) {
+      this.selectComponentApp = new SelectComponent(this)
+      this.selectComponentApp.connect()
+      // 初始化节点树
+      createNode.call(this, null, null, null, true)
+      processRelations(this, Relations)
+      if (typeof options.data === 'function') {
+        options.data = options.data()
+      }
+
+      getUrl()
+      this.createSelectorQuery = function() {
+        return my.createSelectorQuery()
+      }
+      if (options.onLoad) {
+        options.onLoad.call(this, res)
+      }
+    }
+
+    _opts.onReady = function(param) {
+      let ast = null
+      if (this.$node) {
+        ast = this.$node.getRootNode()
+      }
+      ast && processRelationNodes(ast)
+      if (options.onReady) {
+        options.onReady.call(this, param)
+      }
+      if (ast) {
+        ast.isPageReady = true
+      }
+    }
+    _opts.onShow = function(param) {
+      if (config.env === 'development' && config.useRuntimeLog) {
+        watchShakes()
+      }
+      if (options.onShow) {
+        options.onShow.call(this, param)
+      }
+    }
+    if (options.onResize) {
+      _opts.events = options.events || {}
+      _opts.events.onResize = function(e) {
+        const { size } = e
+        const { windowHeight, windowWidth } = size
+        let deviceOrientation = 'landscape'
+        let resizeObj = {}
+        if (windowHeight > windowWidth) {
+          deviceOrientation = 'portrait'
+        }
+
+        const { screenWidth, screenHeight } = my.getSystemInfoSync()
+        size.screenWidth = screenWidth
+        size.screenHeight = screenHeight
+
+        resizeObj = {
+          deviceOrientation,
+          size,
+        }
+
+        /**
+                * 组件所在的页面尺寸变化时执行
+                */
+        if (this.$node && Array.isArray(this.$node.$children)) {
+          this.$node.$children.forEach((c) => {
+            if (c.$self.antmovePageLifetimes) {
+              c.$self.antmovePageLifetimes(e = resizeObj)
+            }
+          })
+        }
+
+        options.onResize(e = resizeObj)
+      }
+    }
+
+    _opts.antmoveAction = antmoveAction
+  },
+}
+
+
+function processRelationNodes(ast = {}) {
+  const $nodes = ast.$nodes
+
+  /**
+     * componentNodes onPageReady
+     */
+  Object.keys($nodes)
+    .forEach((item) => {
+      const node = $nodes[item]
+      connectNodes(node, ast)
+
+      if (node.$self && typeof node.$self.onPageReady === 'function') {
+        node.$self.onPageReady()
+      }
+    })
+
+  ast.mountedHandles
+    .forEach((fn) => {
+      fn()
+    })
+  ast.mountedHandles = []
+}
+
+
+function processRelations(ctx, relationInfo = {}) {
+  let route = ctx.route
+  route = route.replace(/\/node_modules\/[a-z-]+\/[a-z-]+/, '')
+
+  if (route[0] !== '/') { route = `/${route}` }
+
+  const info = relationInfo[route] || relationInfo[route.substring(1)]
+  if (info) {
+    processRelationHandle(info, (node) => {
+      const id = node.$id
+      if (id === 'saveChildRef0') {
+        ctx[id] = function() {}
+        node.$index = 0
+        node.$route = route
+        createNode.call(ctx, ctx, null, node)
+        return false
+      }
+      ctx[id] = function(ref) {
+        if (!ref) { return false }
+        ctx.$antmove = ctx.$antmove || {}
+        if (ctx.$antmove[id] === undefined) {
+          ctx.$antmove[id] = 0
+        } else {
+          ctx.$antmove[id] += 1
+        }
+        ctx.selectComponentApp.preProcesscomponents(ref)
+        node.$index = ctx.$antmove[id]
+        node.$route = route
+        createNode.call(ctx, ref, null, node)
+      }
+    })
+  } else {
+    console.warn('Missing nodes relation of ', route)
+  }
+}

+ 39 - 0
__antmove/component/classSubdirectory/processRelation.js

@@ -0,0 +1,39 @@
+class Node {
+  constructor(opts = {}) {
+    this.$id = opts.id
+    this.$opts = opts
+    this.$children = []
+    this.$parent = null
+
+    this.$render = function() {}
+  }
+
+  appendChild(child) {
+    this.$children.push(child)
+    child.$parent = this
+  }
+
+  removeChild(child) {
+    this.$children = this.$children.filter((c) => {
+      return c.$id !== child.$id
+    })
+  }
+}
+
+module.exports = function link(opts = {}, cb) {
+  const node = new Node({
+    id: opts.id,
+  })
+
+  if (typeof cb === 'function') {
+    cb(node)
+  }
+
+  if (Array.isArray(opts.children)) {
+    opts.children.forEach((child) => {
+      node.appendChild(link(child, cb))
+    })
+  }
+
+  return node
+}

+ 40 - 0
__antmove/component/classSubdirectory/promise.js

@@ -0,0 +1,40 @@
+const isArray = Array.isArray
+Promise.all = function(arr) {
+  return new Promise(((resolve, reject) => {
+    if (!isArray(arr)) {
+      return reject(new TypeError('Promise.all accepts an array'))
+    }
+
+    const args = Array.prototype.slice.call(arr)
+    if (args.length === 0) { return resolve([]) }
+    let remaining = args.length
+
+    function res(i, val) {
+      try {
+        if (val && (typeof val === 'object' || typeof val === 'function')) {
+          const then = val.then
+          if (typeof then === 'function') {
+            then.call(
+              val,
+              (_val) => {
+                res(i, _val)
+              },
+              reject,
+            )
+            return
+          }
+        }
+        args[i] = val
+        if (--remaining === 0) {
+          resolve(args)
+        }
+      } catch (ex) {
+        reject(ex)
+      }
+    }
+
+    for (let i = 0; i < args.length; i++) {
+      res(i, args[i])
+    }
+  }))
+}

+ 127 - 0
__antmove/component/classSubdirectory/relation.js

@@ -0,0 +1,127 @@
+let id = 0
+const { connectNodes } = require('./utils')
+
+let astCache = {}
+function createAstData() {
+  const RelationAst = {
+    $refNodes: {},
+    $nodes: {},
+    $page: null,
+    current: null,
+    createArray: [],
+    destoryArray: [],
+    mountedHandles: [],
+    componentNodes: {},
+  }
+
+  return RelationAst
+}
+function CreateNode(ctx) {
+  this.$self = ctx
+  ctx.$node = this
+  this.$id = id++
+  this.$children = []
+}
+
+CreateNode.prototype = {
+  getRootNode() {
+    const ctx = this.$self
+    const cacheId = ctx.$page ? ctx.$page.$id : ctx.$id
+
+    return astCache[cacheId]
+  },
+  setParent(parent) {
+    this.$parent = parent
+    parent.appendChild(this)
+  },
+  appendChildren() {
+    this.$children
+      .forEach((child) => {
+        this.appendChild(child)
+      })
+  },
+  destory() {
+    const index = this.$relationNode.$index
+    this.$parent.$children.splice(index, 1)
+  },
+  appendChild(child) {
+    this.$children.push(child)
+    child.$parent = this
+  },
+  removeChild(child) {
+    this.$children = this.$children
+      .filter((el) => {
+        return el.$id !== child.$id
+      })
+  },
+}
+
+
+module.exports = function(node, cb = () => {}, relationNode, bool = false, _bool = false) {
+  let RelationAst = {}
+  const cacheId = this.$page ? this.$page.$id : this.$id
+  if (_bool) {
+    return astCache[cacheId]
+  }
+    
+  if (bool || !astCache[cacheId]) {
+    astCache[cacheId] = createAstData()
+    return astCache[cacheId]
+  }
+  let _relationData = {}
+  function initData(isComponent = false) {
+    let _ctx = this
+    _relationData = createAstData()
+    if (isComponent) {
+      _ctx = this.$page
+    }
+    _ctx.$antmove = _ctx.$antmove || {}
+    _ctx.$antmove.relationData = _relationData
+    _ctx.$antmove.astCache = astCache
+  }
+  if (!this.$page) {
+    initData.call(this)
+  } else {
+    if (!this.$page.$antmove
+            || !this.$page.$antmove.relationData) {
+      initData.call(this, true)
+    }
+    _relationData = this.$page.$antmove.relationData
+    astCache = this.$page.$antmove.astCache
+  }
+
+  RelationAst = astCache[cacheId]
+  const wrapNode = new CreateNode(node)
+  const route = relationNode.$route
+
+  RelationAst.$page = wrapNode
+
+  /**
+       * component
+       */
+  wrapNode.$relationNode = relationNode
+  RelationAst.$nodes[node.$id] = wrapNode
+  RelationAst.$refNodes[route] = RelationAst.$refNodes[route] || {}
+  const componentNodes = RelationAst.$refNodes[route]
+  RelationAst.$refNodes[route][relationNode.$id] = RelationAst.$refNodes[route][relationNode.$id] || []
+  componentNodes[relationNode.$id].push(wrapNode)
+
+  if (RelationAst.isPageReady) {
+    setTimeout(() => {
+      connectNodes(wrapNode, RelationAst)
+      RelationAst.mountedHandles
+        .forEach((fn) => {
+          if (wrapNode.$parent) {
+            fn()
+          } else {
+            setTimeout(() => {
+              fn()
+            }, 0)
+          }
+        })
+      RelationAst.mountedHandles = []
+    }, 0)
+  }
+  cb && cb(RelationAst)
+  return RelationAst
+}

+ 84 - 0
__antmove/component/classSubdirectory/selectComponent.js

@@ -0,0 +1,84 @@
+function selectComponent(ctx) {
+  this.$ctx = ctx
+  this.$nodes = {}
+  this.$cacheNodes = {}
+}
+
+selectComponent.prototype = {
+  _addComponentNode(className, ctx) {
+    className = `.${className}`
+    const componentNodes = this.$nodes
+    if (componentNodes[className]) {
+      componentNodes[className].push(ctx)
+    } else {
+      componentNodes[className] = [ctx]
+    }
+    this.$cacheNodes[ctx.$id] = { className }
+  },
+  addComponentNodeId(id, ctx) {
+    id = `#${id}`
+    ctx.props && ctx.props.id ? ctx.id = ctx.props.id : ctx.id = ''
+    const componentNodes = this.$nodes
+    if (componentNodes[id]) {
+      componentNodes[id].push(ctx)
+    } else {
+      componentNodes[id] = [ctx]
+    }
+    this.$cacheNodes[ctx.$id] = { id }
+  },
+  addComponentNode(className = '', ctx) {
+    ctx.props && ctx.props.id ? ctx.id = ctx.props.id : ctx.id = ''
+    const classNameArray = className.split(/\s+/g)
+    classNameArray.forEach((classNameStr) => {
+      this._addComponentNode(classNameStr, ctx)
+    })
+  },
+  selectComponent(className) {
+    const componentNodes = this.$nodes
+    return componentNodes[className] && componentNodes[className][0]
+  },
+  selectComponents(className) {
+    const componentNodes = this.$nodes
+    return componentNodes[className]
+  },
+  preProcesscomponents,
+  connect() {
+    const ctx = this.$ctx
+    const self = this
+    ctx.selectComponent = function(...p) {
+      if (self.selectComponent(...p) && self.selectComponent(...p)._this !== undefined) {
+        return self.selectComponent(...p)._this
+      } else {
+        return self.selectComponent(...p)
+      }
+    }
+    ctx.selectAllComponents = function(...p) {
+      const componentsArr = self.selectComponents(...p) || []
+      const newArr = []
+      componentsArr.forEach((item) => {
+        if (item._this !== undefined) {
+          newArr.push(item._this)
+        } else {
+          newArr.push(item)
+        }
+      })
+      return newArr
+    }
+  },
+}
+
+function preProcesscomponents(ctx) {
+  const selectorObj = this.$cacheNodes[ctx.$id]
+  selectorObj && Object.keys(selectorObj)
+    .forEach((item) => {
+      this.$nodes[item] = []
+    })
+  if (ctx.props.id) {
+    this.addComponentNodeId(ctx.props.id, ctx)
+  }
+  if (ctx.props.className) {
+    this.addComponentNode(ctx.props.className, ctx)
+  }
+}
+
+module.exports = selectComponent

+ 94 - 0
__antmove/component/classSubdirectory/utils.js

@@ -0,0 +1,94 @@
+/**
+ * 把支付宝的e转成对等的微信e
+ */
+function antmoveAction(e) {
+  const wxEvent = {
+    currentTarget: e.currentTarget,
+    target: e.target,
+    type: e.type.toLowerCase(),
+    changedTouches: e.changedTouches,
+    touches: e.touches,
+    timeStamp: e.timeStamp,
+  }
+
+  const eventDetail = e.detail || {}
+
+  const { pageX, pageY } = eventDetail
+
+  if (!wxEvent.changedTouches) {
+    wxEvent.changedTouches = [
+      e.detail
+    ]
+  }
+
+  if (!wxEvent.touches) {
+    wxEvent.touches = [
+      e.detail
+    ]
+  }
+
+  if (typeof pageX !== 'undefined' && typeof pageY !== 'undefined') {
+    wxEvent.detail = {
+      x: pageX,
+      y: pageY,
+    }
+  } else {
+    wxEvent.detail = eventDetail
+  }
+
+  const userFnName
+        = `antmove${
+          wxEvent.type.replace(/^\w/, ($1) => {
+            return $1.toUpperCase()
+          })}`
+
+  const userFn = e.currentTarget.dataset[userFnName]
+
+  if (!userFn || !this[userFn]) {
+    console.warn(
+      `does not have a method "${userFnName}" to handle event "${wxEvent.type}"`,
+    )
+    return
+  }
+
+  delete e.currentTarget.dataset[userFnName]
+
+  this[userFn](wxEvent)
+}
+
+module.exports = {
+  connectNodes: function connectNodes(node, ast) {
+    if (!node.$relationNode.$parent) { return false }
+    const parentNodeId = node.$relationNode.$parent.$id
+    const parentNodeRoute = node.$relationNode.$parent.$route
+
+    const refNumbers
+            = (node.$self.props.refNumbers
+                && node.$self.props.refNumbers.length)
+            || 1
+
+    const parentArray = ast.$refNodes[parentNodeRoute][parentNodeId]
+    let parent = null
+    if (refNumbers > 1) {
+      parentArray.forEach((_parent) => {
+        if (_parent.$children.length < refNumbers && !parent) {
+          parent = _parent
+          return true
+        }
+      })
+    } else {
+      parent = parentArray[parentArray.length - 1]
+    }
+    if (parent) {
+      node.setParent(parent)
+    }
+  },
+  setIfWatch,
+  antmoveAction,
+}
+function setIfWatch(res) {
+  my.setStorageSync({
+    key: 'ifWatch',
+    data: res,
+  })
+}

+ 30 - 0
__antmove/component/componentClass.js

@@ -0,0 +1,30 @@
+/**
+ * type:0 missing
+ * type:1 diff
+ * 
+ */
+const appTransformation = require('./classSubdirectory/app')
+const pageTransformation = require('./classSubdirectory/page')
+const componentTransformation = require('./classSubdirectory/component')
+
+const originApp = App
+const originPage = Page
+const originComponent = Component
+
+App = function(options = {}) {
+  const _opts = {}
+  appTransformation.processTransformationApp(_opts, options)
+  originApp(_opts)
+}
+Page = function(options = {}) {
+  const _opts = {}
+  pageTransformation.processTransformationPage(_opts, options)
+  originPage(_opts)
+}
+Component = function(options = {}) {
+  const _opts = {}
+  componentTransformation.processTransformationComponent(_opts, options)
+    
+  originComponent(_opts)
+}
+

+ 9 - 0
__antmove/component/custom-checkbox/custom-checkbox.acss

@@ -0,0 +1,9 @@
+.am_checkbox_wrap {
+  display: inline-block;
+}
+.am_innerbox {
+  display: inline-flex;
+  align-items: center;
+  /* vertical-align:text-bottom; */
+  vertical-align: middle;
+}

+ 13 - 0
__antmove/component/custom-checkbox/custom-checkbox.axml

@@ -0,0 +1,13 @@
+<view  class="{{className}} am_checkbox_wrap" style='{{style}}'>
+    <view class='am_innerbox'>
+        <checkbox value='{{value}}' disabled='{{disabled}}' checked='{{checked}}' color='{{color}}'></checkbox>
+        <view>
+            <slot></slot>
+        </view>
+    </view>
+</view>
+
+
+
+
+

+ 13 - 0
__antmove/component/custom-checkbox/custom-checkbox.js

@@ -0,0 +1,13 @@
+Component({
+  props: {
+    className: '',
+    value: '',
+    disabled: false,
+    checked: false,
+    color: '#09BB07',
+    style: '',
+  },
+  methods: {
+        
+  },
+})

+ 3 - 0
__antmove/component/custom-checkbox/custom-checkbox.json

@@ -0,0 +1,3 @@
+{
+    "component": true
+}

+ 3 - 0
__antmove/component/custom-input/custom-input.acss

@@ -0,0 +1,3 @@
+input {
+  font-size: 30rpx;
+}

+ 25 - 0
__antmove/component/custom-input/custom-input.axml

@@ -0,0 +1,25 @@
+<view onTap='tapHandler' catchTap='catchtapHandler'>
+    <input
+        value='{{value}}'
+        class='{{className}}'
+        type='{{type}}'
+        style='{{style}}'
+        name='{{name}}'
+        password='{{password}}'
+        placeholder='{{placeholder}}'
+        placeholder-style='{{placeholderStyly}}'
+        placeholder-class='{{placeholderClass}}'
+        disabled='{{disabled}}'
+        maxlength='{{maxlength}}'
+        focus='{{focus}}'
+        confirm-type='{{confirmType}}'
+        confirm-hold='{{confirmHold}}'
+        cursor='{{cursor}}'
+        selection-start='{{selectionStart}}'
+        selection-end='{{selectionEnd}}'
+        onInput='inputHandler'
+        onFocus='focusHandler'
+        onConfirm='confirmHandler'
+        onBlur='blurHandler'
+        />
+</view>

+ 61 - 0
__antmove/component/custom-input/custom-input.js

@@ -0,0 +1,61 @@
+const processDataSet = require('../utils/processDataSet')
+
+Component({
+  props: {
+    value: '',
+    type: '',
+    password: false,
+    placeholder: '',
+    placeholderStyle: '',
+    placeholderClass: '',
+    disabled: false,
+    maxlength: 140,
+    focus: false,
+    confirmType: 'done',
+    confirmHold: false,
+    cursor: 0,
+    selectionStart: -1,
+    selectionEnd: -1,
+    name: '',
+    onInput: () => {},
+    onFocus: () => {},
+    onBlur: () => {},
+    onConfirm: () => {},
+    onTap: () => {},
+    catchTap: () => {},
+  },
+  methods: {
+    inputHandler(e) {
+      if (this.props.onInput) {
+        const tapEvent = processDataSet(e, this.props)
+        this.props.onInput(tapEvent)
+      }
+    },
+    focusHandler(e) {
+      if (this.props.onFocus) {
+        const tapEvent = processDataSet(e, this.props)
+        this.props.onFocus(tapEvent)
+      }
+    },
+    blurHandler(e) {
+      if (this.props.onBlur) {
+        const tapEvent = processDataSet(e, this.props)
+        this.props.onBlur(tapEvent)
+      }
+    },
+    bindconfirmHandler(e) {
+      if (this.props.onConfirm) {
+        const tapEvent = processDataSet(e, this.props)
+        this.props.onConfirm(tapEvent)
+      }
+    },
+    tapHandler(e) {
+      const tapEvent = processDataSet(e, this.props)
+      this.props.onTap && this.props.onTap(tapEvent)
+    },
+    catchtapHandler(e) {
+      const tapEvent = processDataSet(e, this.props)
+      this.props.catchTap && this.props.catchTap(tapEvent)
+    },
+  },
+})

+ 3 - 0
__antmove/component/custom-input/custom-input.json

@@ -0,0 +1,3 @@
+{
+    "component": true
+}

+ 10 - 0
__antmove/component/custom-label/custom-label.acss

@@ -0,0 +1,10 @@
+.custom_label_mark {
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%
+}
+.custom_label_box {
+  position: relative;
+}

+ 6 - 0
__antmove/component/custom-label/custom-label.axml

@@ -0,0 +1,6 @@
+<view class="{{className}} custom_label_box" style="{{style}}" onTap='tapHandler'>
+    <view a:if='{{catchTap}}' class='custom_label_mark' catchTap='catchtapHandler'></view>
+    <label for="{{for}}">
+      <slot></slot>
+    </label>
+</view>

+ 17 - 0
__antmove/component/custom-label/custom-label.js

@@ -0,0 +1,17 @@
+const processDataSet = require('../utils/processDataSet')
+
+Component({
+  props: {
+    for: '',
+  },
+  methods: {
+    tapHandler(e) {
+      const tapEvent = processDataSet(e, this.props)
+      this.props.onTap && this.props.onTap(tapEvent)
+    },
+    catchtapHandler(e) {
+      const tapEvent = processDataSet(e, this.props)
+      this.props.catchTap && this.props.catchTap(tapEvent)
+    },
+  },
+})

+ 3 - 0
__antmove/component/custom-label/custom-label.json

@@ -0,0 +1,3 @@
+{
+    "component": true
+}

+ 4 - 0
__antmove/component/custom-swiper-item/custom-swiper-item.acss

@@ -0,0 +1,4 @@
+.am-swiper-item-wrap {
+  width: 100%;
+  height: 100%;
+}

+ 12 - 0
__antmove/component/custom-swiper-item/custom-swiper-item.axml

@@ -0,0 +1,12 @@
+<swiper-item class='{{className}}' style='{{style}}'>
+    <view class="am-swiper-item-wrap" a:if="{{onTap}}"  onTap='tapHandler'>
+        <slot></slot>
+    </view>
+    <view class="am-swiper-item-wrap" a:if="{{catchTap}}" catchTap="catchTapHandler">
+        <slot></slot>
+    </view>
+    <view class="am-swiper-item-wrap" a:else>
+        <slot></slot>
+    </view>
+</swiper-item>
+

+ 24 - 0
__antmove/component/custom-swiper-item/custom-swiper-item.js

@@ -0,0 +1,24 @@
+const processDataSet = require('../utils/processDataSet')
+
+
+Component({
+  data: {},
+  props: {
+        
+  },
+  methods: {
+    tapHandler(e) {
+      if (this.props.onTap) {
+        const tapEvent = processDataSet(e, this.props)
+        this.props.onTap(tapEvent)
+      }
+    },
+    catchTapHandler(e) {
+      if (this.props.catchTap) {
+        const tapEvent = processDataSet(e, this.props)
+        this.props.catchTap(tapEvent)
+      }
+    },
+
+  },
+})

+ 3 - 0
__antmove/component/custom-swiper-item/custom-swiper-item.json

@@ -0,0 +1,3 @@
+{
+    "component": true
+}

+ 12 - 0
__antmove/component/custom-swiper/custom-swiper.acss

@@ -0,0 +1,12 @@
+.am_swiper_box {
+  position: relative;
+  width: 100%;
+  height: 100%;
+}
+.am_swiper_mask {
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+}

+ 25 - 0
__antmove/component/custom-swiper/custom-swiper.axml

@@ -0,0 +1,25 @@
+<view class="am_swiper_box" onTap='tapHandler'>
+    <view class="am_swiper_mask" a:if="{{catchTap}}" catchTap="catchTapHandler"></view>
+    <swiper
+        style='{{style}}'
+        class="{{className}}"
+        indicator-dots='{{indicatorDots}}'
+        interval='{{interval}}'
+        current='{{current}}'
+        indicator-color='{{indicatorColor}}'
+        indicator-active-color='{{indicatorActiveColor}}'
+        autoplay='{{autoplay}}'
+        circular='{{circular}}'
+        previousMargin='{{previousMargin}}'
+        nextMargin='{{nextMargin}}'
+        vertical='{{vertical}}'
+        duration='{{duration}}'
+        disable-touch="{{disableTouch}}"
+        onChange='changeHandler'
+        onTransition='transitionHandler'
+        onAnimationEnd='animationEndHandler'
+    >
+        <slot></slot>
+    </swiper>
+ </view>
+

+ 52 - 0
__antmove/component/custom-swiper/custom-swiper.js

@@ -0,0 +1,52 @@
+const processDataSet = require('../utils/processDataSet')
+
+
+Component({
+  data: {},
+  props: {
+    duration: 500,
+    indicatorDots: false,
+    indicatorColor: 'rgba(0, 0, 0, .3)',
+    indicatorActiveColor: '#000',
+    autoplay: false,
+    current: 0,
+    interval: 5000,
+    circular: false,
+    vertical: false,
+    disableTouch: false,
+    previousMargin: '0px',
+    nextMargin: '0px',
+  },
+  methods: {
+    tapHandler(e) {
+      if (this.props.onTap) {
+        const tapEvent = processDataSet(e, this.props)
+        this.props.onTap(tapEvent)
+      }
+    },
+    catchTapHandler(e) {
+      if (this.props.catchTap) {
+        const tapEvent = processDataSet(e, this.props)
+        this.props.catchTap(tapEvent)
+      }
+    },
+    changeHandler(e) {
+      if (this.props.onChange) {
+        const tapEvent = processDataSet(e, this.props)
+        this.props.onChange(tapEvent)
+      }
+    },
+    transitionHandler(e) {
+      if (this.props.onTransition) {
+        const tapEvent = processDataSet(e, this.props)
+        this.props.onTransition(tapEvent)
+      }
+    },
+    animationEndHandler(e) {
+      if (this.props.onAnimationEnd) {
+        const tapEvent = processDataSet(e, this.props)
+        this.props.onAnimationEnd(tapEvent)
+      }
+    },
+  },
+})

+ 3 - 0
__antmove/component/custom-swiper/custom-swiper.json

@@ -0,0 +1,3 @@
+{
+    "component": true
+}

+ 16 - 0
__antmove/component/lifeCyclesMap.js

@@ -0,0 +1,16 @@
+/**
+ * type
+ * 0 - missing - 不支持该属性
+ * 1 - diff - 命名及格式不同
+ * 3 - diffType - 类型不同
+ * 4 - defaultValue - 默认值不同
+ */
+
+module.exports = {
+  Component: {
+    created: {
+      type: 1,
+      name: 'onInit',
+    },
+  },
+}

+ 91 - 0
__antmove/component/utils/_relationNode.js

@@ -0,0 +1,91 @@
+const utils = require('../../api/utils')
+
+const { browserPath } = utils
+const posix = browserPath()
+
+function processRelationPath(self, relation) {
+  const from = self.is; let
+    to = relation
+  if (to[0] === '.') {
+    to = `../${to}`
+  }
+  const _p = posix.join(from, to)
+  return _p
+}
+
+function _relationNode(node, info) {
+  const { relationInfo, relation, _p } = info
+
+  // 触发父级组件的 relations
+  const type = relationInfo.type
+  let parentType = ''
+  if (type === 'parent') {
+    parentType = 'child'
+  } else if (type === 'ancestor') {
+    parentType = 'descendant'
+  }
+
+  const parentCtx = node.$self
+  const childCtx = this
+  if (typeof parentCtx.props.theRelations === 'object') {
+    Object.keys(parentCtx.props.theRelations)
+      .forEach((_relation) => {
+        const _relationInfo = parentCtx.props.theRelations[_relation]
+        if (_relationInfo.type === parentType) {
+          _relationNode.call(parentCtx, childCtx.$node, {
+            relationInfo: _relationInfo,
+            relation: _relation,
+            _p: processRelationPath(parentCtx, _relation),
+          })
+
+          return true
+        }
+      })
+  }
+  
+
+  node = node.$self
+  
+  this._storeRelationNodes = this._storeRelationNodes || {}
+  if (this._storeRelationNodes[_p]) {
+    this._storeRelationNodes[_p].push(node)
+  } else {
+    this._storeRelationNodes[_p] = [node]
+  }
+                    
+  if (this._storeRelationNodes[relation]) {
+    this._storeRelationNodes[relation].push(node)
+  } else {
+    this._storeRelationNodes[relation] = [node]
+  }
+  const ctx = this || {}
+  this.getRelationNodes = function(__p) {
+    this._storeRelationNodes = this._storeRelationNodes || {}
+    return this._storeRelationNodes[__p] || []
+  }
+
+  
+  if (typeof relationInfo.linked === 'function') {
+    relationInfo.linked.call(ctx, node)
+  }
+  
+  if (typeof relationInfo.linkChanged === 'function') {
+    const self = this
+    ctx._lifes = ctx._lifes || {}
+    ctx._lifes.didUpdate = ctx._lifes.didUpdate || []
+    ctx._lifes.didUpdate.push(() => {
+      relationInfo.linkChanged.call(self, node)
+    })
+  }
+  if (typeof relationInfo.unlinked === 'function') {
+    const self = this
+    ctx._lifes = ctx._lifes || {}
+    ctx._lifes.didUnmount = ctx._lifes.didUnmount || []
+    ctx._lifes.didUnmount.push(() => {
+      relationInfo.unlinked.call(self, node)
+    })
+  }
+}
+
+
+module.exports = _relationNode

+ 182 - 0
__antmove/component/utils/cloneDeep.js

@@ -0,0 +1,182 @@
+const toString = Object.prototype.toString
+function __type(x) {
+  // fix typeof null = object
+  if (x === null) {
+    return 'null'
+  }
+
+  const t = typeof x
+  if (t !== 'object') {
+    return t
+  }
+
+  let cls
+  let clsLow
+  try {
+    cls = toString.call(x).slice(8, -1)
+    clsLow = cls.toLowerCase()
+  } catch (e) {
+    // ie下的 activex对象
+    return 'object'
+  }
+
+  if (clsLow !== 'object') {
+    return clsLow
+  }
+
+  if (x.constructor === Object) {
+    return clsLow
+  }
+
+  // Object.create(null)
+  try {
+    /* eslint-disable no-proto */
+    if (Object.getPrototypeOf(x) === null || x.__proto__ === null) {
+      /* eslint-enable no-proto */
+      return 'object'
+    }
+  } catch (e) {
+    // 
+  }
+
+  try {
+    const cname = x.constructor.name
+
+    if (typeof cname === 'string') {
+      return cname
+    }
+  } catch (e) {
+    // 无constructor
+  }
+
+  // function A() {}; A.prototype.constructor = null; new A
+  return 'unknown'
+}
+function SimpleWeakmap() {
+  this.cacheArray = []
+}
+const UNIQUE_KEY = `com.yanhaijing.jsmini.clone${(new Date()).getTime()}`
+SimpleWeakmap.prototype.set = function(key, value) {
+  this.cacheArray.push(key)
+  key[UNIQUE_KEY] = value
+}
+SimpleWeakmap.prototype.get = function(key) {
+  return key[UNIQUE_KEY]
+}
+SimpleWeakmap.prototype.clear = function() {
+  for (let i = 0; i < this.cacheArray.length; i++) {
+    const key = this.cacheArray[i]
+    delete key[UNIQUE_KEY]
+  }
+  this.cacheArray.length = 0
+}
+function getWeakMap() {
+  let result
+  if (typeof WeakMap !== 'undefined' && __type(WeakMap) === 'function') {
+    result = new WeakMap()
+    if (__type(result) === 'weakmap') {
+      return result
+    }
+  }
+  result = new SimpleWeakmap()
+
+  return result
+}
+function isClone(x) {
+  const t = __type(x)
+  return t === 'object' || t === 'array'
+}
+function hasOwnProp(obj, key) {
+  return Object.prototype.hasOwnProperty.call(obj, key)
+}
+function copy(x) {
+  const uniqueData = getWeakMap()
+
+  const t = __type(x)
+
+  let root = x
+
+  if (t === 'array') {
+    root = []
+  } else if (t === 'object') {
+    root = {}
+  }
+
+  // 循环数组
+  const loopList = [
+    {
+      parent: root,
+      key: undefined,
+      data: x,
+    }
+  ]
+
+  while (loopList.length) {
+    // 深度优先
+    const node = loopList.pop()
+    const parent = node.parent
+    const key = node.key
+    const source = node.data
+    const tt = __type(source)
+
+    // 初始化赋值目标,key为undefined则拷贝到父元素,否则拷贝到子元素
+    let target = parent
+    if (typeof key !== 'undefined') {
+      parent[key] = tt === 'array' ? [] : {}
+      target = parent[key]
+    }
+
+    // 复杂数据需要缓存操作
+    if (isClone(source)) {
+      // 命中缓存,直接返回缓存数据
+      const uniqueTarget = uniqueData.get(source)
+      if (uniqueTarget) {
+        parent[key] = uniqueTarget
+        continue // 中断本次循环
+      }
+
+      // 未命中缓存,保存到缓存
+      uniqueData.set(source, target)
+    }
+
+    if (tt === 'array') {
+      for (let i = 0; i < source.length; i++) {
+        if (isClone(source[i])) {
+          // 下一次循环
+          loopList.push({
+            parent: target,
+            key: i,
+            data: source[i],
+          })
+        } else {
+          target[i] = source[i]
+        }
+      }
+    } else if (tt === 'object') {
+      for (const k in source) {
+        if (hasOwnProp(source, k)) {
+          if (k === UNIQUE_KEY) { continue }
+          if (isClone(source[k])) {
+            // 下一次循环
+            loopList.push({
+              parent: target,
+              key: k,
+              data: source[k],
+            })
+          } else {
+            target[k] = source[k]
+          }
+        }
+      }
+    }
+  }
+    
+
+  uniqueData.clear && uniqueData.clear()
+    
+  return root
+}
+
+module.exports = {
+  copy,
+}

+ 15 - 0
__antmove/component/utils/collectObserver.js

@@ -0,0 +1,15 @@
+function collectObserver(observerObj, option, ctx) {
+  Object.keys(option).forEach((prop) => {
+    if (typeof option[prop] !== 'object' || !option[prop]) { return false }
+    if (option[prop].observer) {
+      if (typeof option[prop].observer === 'string') {
+        observerObj[prop] = ctx.methods[option[prop].observer]
+      } else {
+        observerObj[prop] = option[prop].observer
+      }
+    }
+  })
+  return observerObj
+}
+
+module.exports = collectObserver

+ 41 - 0
__antmove/component/utils/collectObservers.js

@@ -0,0 +1,41 @@
+const {
+  observersHandle,
+} = require('./observerHandle')
+
+function collectObservers(observersObj, options, param) {
+  const self = this
+  for (const key in options.observers) {
+    if (options.observers.hasOwnProperty(key)) {
+      const keyArr = key.split(',')
+      const arr = []
+      keyArr.forEach((its) => {
+        its = its.trim()
+        let attr = {}
+        if (its.match(/\./)) {
+          const _attr = its.split('.')
+          attr = processChildAttr(self.data, _attr)
+        } else {
+          attr = self.data[its]
+        }
+        arr.push(attr)
+      })
+      keyArr.forEach((its) => {
+        its = its.trim()
+        observersObj[its] = Object.create(null)
+        observersObj[its].fn = options.observers[key]
+        observersObj[its].arr = arr
+      })
+    }
+  }
+  observersHandle(observersObj, param, self)
+}
+
+function processChildAttr(attr, arr) {
+  let _ = attr
+  arr.forEach((name) => {
+    _ = _[name]
+  })
+  return _
+}
+
+module.exports = collectObservers

+ 11 - 0
__antmove/component/utils/compatibleLifetime.js

@@ -0,0 +1,11 @@
+function compatibleLifetime(options) {
+  let _life = {}
+  if (options && options.lifetimes) {
+    _life = options.lifetimes
+  } else if (options) {
+    _life = options
+  }
+  return _life
+}
+
+module.exports = compatibleLifetime

+ 66 - 0
__antmove/component/utils/findRelationNode.js

@@ -0,0 +1,66 @@
+function findRelationNode(node, p, type, isArray = false) {
+  // parent child ancestor descendant
+  const nodes = []
+  const _prcess = {
+    parent(_node) {
+      if (!_node || !_node.$parent) { return }
+      const _p = _node.$parent.$self.is || _node.$parent.$self.route
+      if (_p === p) {
+        return _node.$parent
+      }
+    },
+    child(_node) {
+      let _child = null
+      _node.$children
+        .forEach((child) => {
+          const _p = child.$self.is
+
+          if (_p === p) {
+            _child = child
+  
+            if (!isArray) {
+              return _child
+            }
+            nodes.push(_child)
+          }
+        })
+      return _child
+    },
+    ancestor(__node) {
+      if (!__node) { return }
+      let _node = null
+      _node = _prcess.parent(__node)
+      if (!_node) {
+        _node = _prcess.ancestor(__node.$parent)
+      }
+      return _node
+    },
+    descendant(__node) {
+      let _node = null
+      _node = _prcess.child(__node)
+  
+      if (!_node) {
+        __node.$children
+          .forEach((c) => {
+            _node = _prcess.child(c)
+  
+            if (!_node) {
+              _node = _prcess.descendant(c)
+            }
+          })
+      }
+  
+      return _node
+    },
+  }
+  
+  const ret = _prcess[type](node)
+  
+  if (isArray) {
+    if (type === 'parent' || type === 'ancestor') { return [ret] }
+    return nodes
+  }
+  return ret
+}
+
+module.exports = findRelationNode

+ 16 - 0
__antmove/component/utils/getUrl.js

@@ -0,0 +1,16 @@
+const getUrl = function() {
+  const pages = getCurrentPages()
+  const url = pages[pages.length - 1].route
+  const _arr = url.split('/')
+  const _name = _arr[_arr.length - 1]
+  my.setStorageSync({
+    key: '_pageMsg',
+    data: {
+      pageName: _name,
+      pagePath: url,
+    },
+  })
+  return url
+}
+
+module.exports = getUrl

+ 14 - 0
__antmove/component/utils/handleAfterInit.js

@@ -0,0 +1,14 @@
+function handleAfterInit() {
+  let classStr = ''
+  this.data.__classNames
+    .forEach((key) => {
+      classStr += (this.props[key] || '')
+    })
+  if (this.data._classes !== classStr) {
+    this.setData({
+      _classes: classStr,
+    })
+  }
+}
+
+module.exports = handleAfterInit

+ 24 - 0
__antmove/component/utils/handleExternalClasses.js

@@ -0,0 +1,24 @@
+function handleExternalClasses(opts = {}) {
+  const externalClasses = opts.externalClasses
+  const arr = Array.isArray(externalClasses) ? externalClasses : []
+  const _class = []
+  arr.forEach((a) => {
+    _class.push(_transform(a) || '')
+  })
+
+  opts.data = opts.data || {}
+
+  opts.data.__classNames = _class
+  opts.data.__classes = ''
+
+  function _transform(str = '') {
+    str = str.replace(/-(\w)/g, (...$) => {
+      return $[1].toUpperCase()
+    })
+
+    return str || ''
+  }
+  return opts
+}
+
+module.exports = handleExternalClasses

+ 42 - 0
__antmove/component/utils/handleProps.js

@@ -0,0 +1,42 @@
+function handleProps(opts = {}) {
+  opts.props = opts.props || {}
+
+  if (opts.relations) {
+    opts.props.theRelations = opts.relations
+  }
+  if (!opts.properties) { return false }
+  Object.keys(opts.properties)
+    .forEach((prop) => {
+      const val = opts.properties[prop]
+      if (!val) {
+        opts.props[prop] = val
+        return false
+      }
+
+      if (typeof val === 'function') {
+        const obj = {
+          [Boolean]: false,
+          [String]: '',
+          [Array]: [],
+          [Object]: {},
+        }
+        opts.props[prop] = obj[val]
+        return false
+      }
+
+      if (val.hasOwnProperty('value')) {
+        opts.props[prop] = val.value
+      } else if (val.type !== 'observer') {
+        const info = {
+          [String]: '',
+          [Number]: 0,
+          [Object]: {},
+          [null]: null,
+        }
+
+        opts.props[prop] = info[val.type]
+      }
+    })
+}
+
+module.exports = handleProps

+ 39 - 0
__antmove/component/utils/index.js

@@ -0,0 +1,39 @@
+const getUrl = require('./getUrl')
+const watchShakes = require('./watchShakes')
+const updateData = require('./updateData')
+const processRelationPath = require('./processRelationPath')
+const _relationNode = require('./_relationNode')
+const findRelationNode = require('./findRelationNode')
+const compatibleLifetime = require('./compatibleLifetime')
+const collectObserver = require('./collectObserver')
+const collectObservers = require('./collectObservers')
+const processTriggerEvent = require('./processTriggerEvent')
+const { observerHandle } = require('./observerHandle')
+const processDataSet = require('./processDataSet')
+const handleProps = require('./handleProps')
+const handleExternalClasses = require('./handleExternalClasses')
+const handleAfterInit = require('./handleAfterInit')
+const mergeOptions = require('./mergeOptions')
+const { copy } = require('./cloneDeep')
+const nextUid = require('./nextUid')
+
+module.exports = {
+  getUrl,
+  watchShakes,
+  updateData,
+  processRelationPath,
+  _relationNode,
+  findRelationNode,
+  compatibleLifetime,
+  collectObserver,
+  collectObservers,
+  processTriggerEvent,
+  observerHandle,
+  processDataSet,
+  handleProps,
+  handleExternalClasses,
+  handleAfterInit,
+  mergeOptions,
+  copy,
+  nextUid,
+}

+ 21 - 0
__antmove/component/utils/mergeOptions.js

@@ -0,0 +1,21 @@
+function mergeOptions(parent, child) {
+  Object.keys(parent)
+    .forEach((key) => {
+      const val = parent[key]
+      const _val = child[key]
+  
+      if (Array.isArray(_val)) { return false }
+      if (child[key] === undefined) { child[key] = parent[key] }
+
+      if (typeof val === 'object' && typeof _val === 'object') {
+        child[key] = Object.assign({}, _val, val)
+      } else if (typeof val === 'function' && typeof _val === 'function') {
+        child[key] = function(...p) {
+          val.apply(this, p)
+          _val.apply(this, p)
+        }
+      }
+    })
+}
+
+module.exports = mergeOptions

+ 5 - 0
__antmove/component/utils/nextUid.js

@@ -0,0 +1,5 @@
+module.exports = function nextUid(len = 8) {
+  return Math.random()
+    .toString(36)
+    .substr(len + 1)
+}

+ 96 - 0
__antmove/component/utils/observerHandle.js

@@ -0,0 +1,96 @@
+const equals = function(x, y) {
+  if (x === y) {
+    return true
+  }
+
+  if (!(x instanceof Object) || !(y instanceof Object)) {
+    return false
+  }
+  if (x.constructor !== y.constructor) {
+    return false
+  }
+
+  for (const p in x) {
+    if (x.hasOwnProperty(p)) {
+      if (!y.hasOwnProperty(p)) {
+        return false
+      }
+
+      if (x[p] === y[p]) {
+        continue
+      }
+
+      if (typeof x[p] !== 'object') {
+        return false
+      }
+      if (!equals(x[p], y[p])) {
+        return false
+      }
+    }
+  }
+
+  for (const p in y) {
+    if (y.hasOwnProperty(p) && !x.hasOwnProperty(p)) {
+      return false
+    }
+  }
+  return true
+}
+
+function observerHandle(observerObj, args, that) {
+  Object.keys(observerObj).forEach((obs) => {
+    if (typeof observerObj[obs] === 'function') {
+      let props
+      if (args.props) {
+        props = args.props
+      }
+      if (args[0]) {
+        props = args[0]
+      }
+      if (!props) {
+        return
+      }
+      if (!equals(props[obs], that.props[obs])) {
+        observerObj[obs].call(that, that.props[obs], props[obs])
+      }
+    }
+  })
+}
+
+function observersHandle(observersObj, args, that) {
+  let preData = null
+  if (Array.isArray(args)) {
+    preData = args[1]
+  } else {
+    preData = args.props
+  }
+  Object.keys(observersObj).forEach((obs) => {
+    let left = {}
+    let right = {}
+    if (obs.match(/\./)) {
+      const _dataArr = obs.split('.')
+      left = processChildAttr(preData, _dataArr)
+      right = processChildAttr(that.data, _dataArr)
+    } else {
+      left = preData[obs]
+      right = that.data[obs]
+    }
+    const dif = equals(left, right)
+    if (!dif) {
+      observersObj[obs].fn.call(that, ...observersObj[obs].arr)
+    }
+  })
+}
+
+function processChildAttr(attr, arr) {
+  let _ = attr
+  arr.forEach((name) => {
+    _ = _[name]
+  })
+  return _
+}
+
+module.exports = {
+  observerHandle,
+  observersHandle,
+}

+ 34 - 0
__antmove/component/utils/processDataSet.js

@@ -0,0 +1,34 @@
+/**
+ * 把props的data属性,处理成dataset
+ * { 'data-alpha-beta': 3 }
+ * { alphaBeta: 3 }
+ */
+function processDataSet(e, props = {}) {
+  if (e.timeStamp === undefined) {
+    e = {
+      ...e,
+      target: {
+        dataset: {},
+      },
+      currentTarget: {
+        dataset: {},
+      },
+    }
+  }
+  Object.keys(props)
+    .forEach((prop) => {
+      const matched = prop.match(/^data-(.+)/)
+
+      if (matched) {
+        const key = matched[1].replace(/-(\w)/, ($0, $1) => {
+          return $1.toUpperCase()
+        })
+
+        e.target.dataset[key] = props[prop]
+        e.currentTarget.dataset[key] = props[prop]
+      }
+    })
+  return e
+}
+
+module.exports = processDataSet

+ 16 - 0
__antmove/component/utils/processRelationPath.js

@@ -0,0 +1,16 @@
+const utils = require('../../api/utils')
+
+const { browserPath } = utils
+const posix = browserPath()
+
+function processRelationPath(self, relation) {
+  const from = self.is
+  let to = relation
+  if (to[0] === '.') {
+    to = `../${to}`
+  }
+  const _p = posix.join(from, to)
+  return _p
+}
+
+module.exports = processRelationPath

+ 52 - 0
__antmove/component/utils/processTriggerEvent.js

@@ -0,0 +1,52 @@
+function createCustomEvent(props = {}) {
+  const e = {
+    target: {
+      dataset: {},
+    },
+    currentTarget: {
+      dataset: {},
+      // 组件的id
+      id: props.id,
+    },
+  }
+
+  Object.keys(props)
+    .forEach((prop) => {
+      if (prop.match(/^data-/)) {
+        const originProp = prop
+        prop = prop.replace(/[A-Z]/g, ($) => {
+          return $.toLowerCase()
+        })
+
+
+        prop = prop.split('-')
+        prop.shift()
+        prop = prop.join('')
+        e.target.dataset[prop] = props[originProp]
+        e.currentTarget.dataset[prop] = props[originProp]
+      }
+    })
+  return e
+}
+
+function processTriggerEvent() {
+  this.triggerEvent = function(event, data) {
+    const eventType = (event[0].toLowerCase() + event.substring(1))
+    event = `on${event[0].toUpperCase()}${event.substring(1)}`
+
+    const e = createCustomEvent(this.props)
+
+    e.type = eventType
+    e.detail = data
+    event = event.replace(/-\w+/, (name) => {
+      name = name[1].toUpperCase() + name.substring(2)
+      return name
+    })
+
+    if (typeof this.props[event] === 'function') {
+      this.props[event](e)
+    }
+  }
+}
+
+module.exports = processTriggerEvent

+ 24 - 0
__antmove/component/utils/updateData.js

@@ -0,0 +1,24 @@
+const config = require('../../api/config.js')
+
+function updateData(param) {
+  const ctx = this
+  if (typeof ctx.properties === 'object') {
+    ctx.properties.name = ctx.properties.name || ''
+    ctx.properties.value = ctx.properties.value || null
+    Object.keys(ctx.properties)
+      .forEach((item) => {
+        // didupdate
+        if (param && param[0][item] === this.props[item]) { return false }
+        if (ctx.props[item] !== undefined && typeof ctx.props[item] !== 'function' && item[0] !== '$' && ctx.data[item] !== ctx.props[item]) {
+          ctx.setData({
+            [item]: ctx.props[item],
+          })
+        }
+        if (typeof ctx.props[item] === 'function' && config.env !== 'production') {
+          console.warn('外部使用自定义组件时,如果传递参数是函数,请使用props获取,避免使用data获取')
+        }
+      })
+  }
+}
+
+module.exports = updateData

+ 69 - 0
__antmove/component/utils/watchShakes.js

@@ -0,0 +1,69 @@
+let times = 0
+let lastTime = 0
+
+const getLogInfo = function() {
+  let num = 0
+  let info = my.getStorageSync({
+    key: '__antmove_loginfo',
+  }).data
+  if (info === null) { return false }
+  info = info.pages
+  info.forEach((v) => {
+    num += v.logs.length
+  })
+  return num
+}
+
+function getNewData() {
+  if (!lastTime) {
+    lastTime = new Date().getTime()
+    times = 1
+  } else {
+    const thisTime = new Date().getTime()
+    times += 1
+    if (thisTime - lastTime > 1000 || times > 3) {
+      times = 1
+    }
+    lastTime = thisTime
+  }
+}
+
+
+const watchShakes = function() {
+  const pages = getCurrentPages()
+  const url = pages[pages.length - 1].route
+  const logUrl = 'pages/ant-move-runtime-logs/index'
+  const specificUrl = 'pages/ant-move-runtime-logs/specific/index'
+  my.watchShake({
+    success() {
+      const num = getLogInfo()
+      const ifWatch = my.getStorageSync({
+        key: 'ifWatch',
+      }).data
+      getNewData()
+      if (times !== 3 || !ifWatch || url === logUrl || url === specificUrl || !num) {
+        watchShakes()
+        return false
+      }
+      my.confirm({
+        title: '温馨提示',
+        content: `已收集了${num}条问题日志,是否查看?  (该弹窗和问题收集页面的代码由Antmove嵌入,上线时请记得去掉)`,
+        confirmButtonText: '赶紧看看',
+        cancelButtonText: '暂不需要',
+        success(res) {
+          if (res.confirm) {
+            my.navigateTo({
+              url: '/pages/ant-move-runtime-logs/index',
+            })
+          }
+        },
+        complete() {
+          watchShakes()
+        },
+      })
+    },
+  })
+}
+
+
+module.exports = watchShakes

+ 270 - 0
__antmove/static/app.acss

@@ -0,0 +1,270 @@
+.page-container-classname {
+    cursor: default;
+    -webkit-user-select: none;
+    user-select: none;
+    width: 100%;
+    overflow-x: hidden;
+}
+
+view {
+    display: block;
+}
+
+scroll-view {
+    display: block;
+    width: 100%;
+}
+
+swiper {
+    display: block;
+    height: 150px;
+}
+
+swiper-item {
+    display: block;
+    overflow: hidden;
+    will-change: transform;
+}
+
+movable-area {
+    display: block;
+    position: relative;
+    width: 10px;
+    height: 10px;
+}
+
+movable-view {
+    display: inline-block;
+    width: 10px;
+    height: 10px;
+    top: 0px;
+    left: 0px;
+    position: absolute;
+}
+
+cover-view {
+    display: block;
+    line-height: 1.2;
+    overflow: hidden;
+    white-space: nowrap;
+    pointer-events: auto;
+    background-color: rgba(255,255,255,0);
+}
+
+icon {
+    display: inline-block;
+    font-size: 0;
+}
+
+progress {
+    display: -webkit-flex;
+    display: flex;
+    -webkit-align-items: center;
+    align-items: center;
+}
+
+button {
+    height:initial;
+    position: relative;
+    display: block;
+    margin-left: auto;
+    margin-right: auto;
+    padding-left: 14px;
+    padding-right: 14px;
+    box-sizing: border-box;
+    font-size: 18px;
+    text-align: center;
+    text-decoration: none;
+    line-height: 2.55555556;
+    border-radius: 5px;
+    -webkit-tap-highlight-color: transparent;
+    overflow: hidden;
+    /* color: #000;
+    background-color: #f8f8f8; */
+}
+button[type=primary] {
+    color: #FFFFFF;
+    background-color: #1AAD19;
+}
+
+button[loading][type=primary] {
+    color: rgba(255, 255, 255, 0.6);
+    background-color: #179B16;
+}
+
+button[disabled][type=primary] {
+    background-color: #9ED99D;
+}
+
+button[disabled] {
+    color: rgba(255, 255, 255, 0.6);
+}
+
+button[type=default] {
+    color: #000000;
+    background-color: #F8F8F8;
+}
+
+button[disabled][type=default] {
+    color: rgba(0, 0, 0, 0.3);
+    background-color: #F7F7F7;
+}
+
+button[type=warn] {
+    color: #FFFFFF;
+    background-color: #E64340;
+}
+
+button[disabled][type=warn] {
+    background-color: #EC8B89;
+}
+
+button[plain] {
+    color: #353535;
+    border: 1px solid #353535;
+    background-color: transparent;
+}
+
+button[type=primary][plain] {
+    color: #1aad19;
+    border: 1px solid #1aad19;
+    background-color: transparent;
+}
+
+button[plain][disabled] {
+    color: rgba(0, 0, 0, 0.2);
+    border-color: rgba(0, 0, 0, 0.2);
+}
+
+button[type=default][plain] {
+    color: #353535;
+    border: 1px solid #353535;
+    background-color: transparent;
+}
+
+button[size=mini] {
+    display: inline-block;
+    line-height: 2.3;
+    font-size: 13px;
+    padding: 0 1.34em;
+}
+
+checkbox {
+    -webkit-tap-highlight-color: transparent;
+    display: inline-block;
+}
+
+checkbox-group {
+    display: block;
+}
+
+input {
+    display: block;
+    text-overflow: clip;
+    overflow: hidden;
+    white-space: nowrap;
+    background-color: rgba(255,255,255,0)
+}
+
+picker {
+    display: block;
+}
+
+
+
+picker-view-column {
+    -webkit-flex: 1;
+    flex: 1;
+    position: relative;
+    z-index: 0;
+    height: 100%;
+    overflow: hidden;
+}
+
+radio {
+    -webkit-tap-highlight-color: transparent;
+    display: inline-block;
+}
+
+radio-group {
+    display: block;
+}
+
+slider {
+    margin: 10px 18px;
+    padding: 0;
+    display: block;
+}
+
+switch {
+    -webkit-tap-highlight-color: transparent;
+    display: inline-block;
+}
+
+textarea {
+    width: 300px;
+    height: 150px;
+    display: block;
+    position: relative;
+}
+
+navigator {
+    height: auto;
+    width: auto;
+    display: block;
+}
+
+image {
+    width: 320px;
+    height: 240px;
+    display: inline-block;
+    overflow: hidden;
+    background-origin: content-box;
+}
+
+
+video {
+    width: 300px;
+    height: 225px;
+    line-height: 0;
+    overflow: hidden;
+    position: relative;
+    z-index: 0;
+    background: #000;
+    margin: 0 auto;
+}
+
+camera {
+    position: relative;
+    width: 100%;
+    display: block;
+    overflow: hidden;
+}
+
+map {
+    position: relative;
+    width: 300px;
+    height: 150px;
+    display: block;
+}
+
+canvas {
+    width: 300px;
+    height: 150px;
+    display: block;
+    position: relative;
+}
+
+ad {
+    display: block !important;
+    width: 100%;
+    overflow: hidden;
+    pointer-events: auto;
+    opacity: 1 !important;
+}
+
+
+web-view {
+    width: 100%;
+    height: 100%;
+}

+ 8 - 0
app.acss

@@ -0,0 +1,8 @@
+@import "/__antmove/static/app.acss";
+@import "./styles/index.acss";
+/**app.wxss**/
+
+page {
+    background-color: #f3f4f6;
+    height: 100%;
+}

+ 53 - 0
app.js

@@ -0,0 +1,53 @@
+import "./__antmove/component/componentClass.js";
+my.global = {};
+const _my = require("./__antmove/api/index.js")(my);
+const wx = _my;
+// app.js
+const { checkUserWhiteListId } = require("./utils/api/api");
+App({
+    data: {
+        phone: null,
+        adminInfo: wx.getStorageSync("adminInfo") || null,
+        language: wx.getStorageSync("language") || "ch",
+        userInfo: wx.getStorageSync("userInfo") || null,
+        extraMessage: wx.getStorageSync("extraMessage") || null,
+        temporary_userInfo: null,
+        temporary_adminInfo: null,
+        type: 0,
+        //0->普通码 1->常客码
+        //(过审专用,禁止删除)- start
+        fake: true,
+        myAppointment: null
+        //(过审专用,禁止删除)- end
+    },
+
+    onLaunch(options) {
+        // 展示本地存储能力
+        const logs = wx.getStorageSync("logs") || [];
+        logs.unshift(Date.now());
+        wx.setStorageSync("logs", logs);
+
+        // 获取状态栏和导航栏的高度
+        const {
+          titleBarHeight,
+          statusBarHeight,
+        } = my.getSystemInfoSync()
+        this.globalData.statusBarHeight = statusBarHeight
+        this.globalData.titleBarHeight = titleBarHeight
+
+        //检测缓存中的常客是否有效(存在)、
+        if (this.data.adminInfo) {
+            checkUserWhiteListId(this.data.adminInfo.userWhitelistId).then(
+                res => {
+                    if (!res.data) {
+                        wx.removeStorageSync("adminInfo");
+                        this.data.adminInfo = null;
+                    }
+                }
+            );
+        }
+    },
+    globalData: {
+        userInfo: null
+    }
+});

+ 85 - 0
app.json

@@ -0,0 +1,85 @@
+{
+  "entryPagePath": "pages/resitor_scence/resitor_scence",
+  "pages": [
+    "pages/resitor_scence/resitor_scence",
+    "pages/faceCheck/faceCheck",
+    "pages/visitor_make/visitor_make",
+    "pages/regular_register/regular_register",
+    "pages/regular_msg/regular_msg",
+    "pages/regular_invite/regular_invite",
+    "pages/regular_visit_records/regular_visit_records",
+    "pages/visit_records/visit_records",
+    "pages/regular_visit_details/regular_visit_details",
+    "pages/regular_company_manage/regular_company_manage",
+    "pages/company_register/company_register",
+    "pages/ocr/ocr",
+    "pages/mine/mine",
+    "pages/changeUserInfo/index",
+    "pages/authorize_three/authorize_three",
+    "pages/protocol/protocol",
+    "pages/visitor_qrcode/visitor_qrcode",
+    "pages/k8_ampe/k8_ampe",
+    "pages/web/web"
+  ],
+  "window": {
+    "backgroundTextStyle": "light",
+    "navigationBarTextStyle": "black",
+    "titleBarColor": "#fff",
+    "defaultTitle": "",
+    "allowsBounceVertical": "NO"
+  },
+  "tabBar": {
+    "borderStyle": "white",
+    "selectedColor": "#909399",
+    "textColor": "#aaaaaa",
+    "items": [
+      {
+        "pagePath": "pages/resitor_scence/resitor_scence",
+        "name": "首页(Index)",
+        "icon": "./static/tabbar/home.png",
+        "activeIcon": "./static/tabbar/home_cur.png"
+      },
+      {
+        "pagePath": "pages/mine/mine",
+        "name": "我的(My)",
+        "icon": "./static/tabbar/mine.png",
+        "activeIcon": "./static/tabbar/mine_cur.png"
+      }
+    ]
+  },
+  "usingComponents": {
+    "zyh-description": "./components/zyh_desc/zyh_desc",
+    "zyh-face-verify": "./components/face_verify/face_verify",
+    "zyh-card": "./components/zyh_card/zyh_card",
+    "zyh-card-visit": "./components/zyh_card2/index",
+    "zyh-navigator": "./components/navigator/index",
+    "zyh-picker": "./components/picker/index",
+    "zyh-radio-group": "./components/radioGroup/index",
+    "zyh-auto-add": "./components/autoAdd/index",
+    "zyh-tail-tip": "./components/tailTip/index",
+    "zyh-details-card": "./components/detailsCard/index",
+    "zyh-dot-line": "./components/dotLine/index",
+    "zyh-input": "./components/input/index",
+    "zyh-ocr-license": "./components/ocrLicense/index",
+    "hh-catch-face": "./components/catchFace",
+    "zjy-radio-checkbox": "./components/radioAndcheckbox",
+    "add-car-number": "./components/addCarNumber",
+    "custom-field": "./components/customField/customField",
+    "area-picker": "./components/area-picker/index",
+    "three_yards": "./components/three_yards/three_yards",
+    "van-radio": "vant-aliapp/dist/dist/radio/index",
+    "van-radio-group": "vant-aliapp/dist/dist/radio-group/index",
+    "van-field": "vant-aliapp/dist/dist/field/index",
+    "van-cell": "vant-aliapp/dist/dist/cell/index",
+    "van-cell-group": "vant-aliapp/dist/dist/cell-group/index",
+    "van-icon": "vant-aliapp/dist/dist/icon/index",
+    "van-loading": "vant-aliapp/dist/dist/loading/index",
+    "van-uploader": "vant-aliapp/dist/dist/uploader/index",
+    "van-popup": "vant-aliapp/dist/dist/popup/index",
+    "auth-popup": "./components/auth-popup/auth-popup",
+    "auth_self": "./components/auth_self/auth_self",
+    "van-picker": "vant-aliapp/dist/dist/picker/index"
+  },
+  "sitemapLocation": "sitemap.json",
+  "lazyCodeLoading": "requiredComponents"
+}

+ 56 - 0
components/addCarNumber/index.acss

@@ -0,0 +1,56 @@
+.addCarNumber-index {
+    display: block;
+    height: initial;
+}
+/* components/addCarNumber/index.wxss */
+
+/* 容器样式 */
+
+.addCarNumber-index .container {
+    padding: 12rpx 12rpx 50rpx 12rpx;
+    display: flex;
+    justify-content: center;
+    flex-wrap: wrap;
+}
+
+/* 中文字母字符样式 */
+
+.addCarNumber-index .box {
+    flex: 1;
+    display: inline-block;
+    background-color: white;
+    border: 1px solid rgb(211, 207, 207);
+    text-align: center;
+    margin: 10rpx;
+    border-radius: 10rpx;
+}
+
+.addCarNumber-index .box-chinese {
+    padding: 15rpx;
+}
+
+.addCarNumber-index .box-number {
+    padding: 13rpx 15rpx;
+}
+
+.addCarNumber-index .box-active:active {
+    background-color: rgb(185, 185, 185);
+    color: white;
+}
+
+/* 删除按钮 */
+
+.addCarNumber-index .box-max {
+    flex: 10000;
+    border: none !important;
+}
+
+.addCarNumber-index .bg-red {
+    background-color: rgb(202, 80, 76);
+    color: white;
+}
+
+.addCarNumber-index .bg-blue {
+    background-color: rgb(58, 116, 224);
+    color: white;
+}

+ 61 - 0
components/addCarNumber/index.axml

@@ -0,0 +1,61 @@
+<view class='addCarNumber-index {{className}}' style='{{style}}' ref='saveChildRef0'>
+  <view onTap='antmoveAction' data-antmove-tap='showpopup'>
+    {{value?value:placeholder}}
+  </view>
+  <van-popup
+    show='{{ show }}'
+    overlay-style='background: transparent;'
+    position='bottom'
+    onClose='onClose'
+    ref='saveChildRef1'
+  >
+    <view a:if='{{showAreaWord}}' class='container'>
+      <view
+        a:for='{{areaWordList}}'
+        class='box box-chinese box-active'
+        data-value='{{item}}'
+        ref-numbers='{{areaWordList}}'
+        onTap='antmoveAction'
+        data-antmove-tap='getValue'
+      >
+        {{item}}
+      </view>
+      <view class='box box-max'>
+      </view>
+    </view>
+    <view a:if='{{!showAreaWord}}' class='container'>
+      <view
+        a:for='{{numberList}}'
+        class='box box-number box-active'
+        data-value='{{item}}'
+        ref-numbers='{{numberList}}'
+        onTap='antmoveAction'
+        data-antmove-tap='getValue'
+      >
+        {{item}}
+      </view>
+      <view
+        a:for='{{wordList}}'
+        class='box box-number box-active'
+        data-value='{{item}}'
+        ref-numbers='{{wordList}}'
+        onTap='antmoveAction'
+        data-antmove-tap='getValue'
+      >
+        {{item}}
+      </view>
+      <view class='box box-number box-max bg-red' style="font-size:24rpx;padding:24rpx 30rpx;" onTap='antmoveAction' data-antmove-tap='delete'>
+        删除
+      </view>
+      <view
+        a:if='{{showCompleteButton}}'
+        class='box box-number box-max bg-blue'
+        style="font-size:24rpx;padding:24rpx 30rpx;"
+        onTap='antmoveAction'
+        data-antmove-tap='onClose'
+      >
+        完成
+      </view>
+    </view>
+  </van-popup>
+</view>

+ 146 - 0
components/addCarNumber/index.js

@@ -0,0 +1,146 @@
+const _my = require("../../__antmove/api/index.js")(my);
+const wx = _my;
+// components/addCarNumber/index.js
+Component({
+  options: {
+    observers: true,
+    lifetimes: true
+  },
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    value: {
+      //输入值
+      value: null
+    },
+    placeholder: {
+      type: String,
+      value: "请输入车牌号"
+    },
+    isAudit: {
+      //是否禁用
+      type: Boolean,
+      value: false
+    },
+    disabled: {
+      //是否禁用
+      type: Boolean,
+      value: false
+    }
+  },
+  /**
+   * 组件的初始数据
+   */
+  data: {
+    areaWordList: ["浙", "京", "沪", "苏", "粤", "鲁", "晋", "冀", "豫", "川", "渝", "辽", "吉", "黑", "皖", "鄂", "湘", "赣", "闽", "陕", "甘", "宁", "蒙", "津", "贵", "云", "桂", "琼", "青", "新", "藏", "港", "澳", "台"],
+    //地域中文表
+    numberList: [],
+    //数字表
+    wordList: [],
+    //字母表
+    show: false,
+    //是否显示键盘弹窗
+    showAreaWord: true,
+    //是否显示地域中文表
+    showCompleteButton: false //是否显示完成按钮
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+    // 点击拉起键盘输入
+    showpopup() {
+      if (!this.data.isAudit && !this.data.disabled) {
+        this.setData({
+          show: true
+        });
+      }
+    },
+    // 获得初始化英文数字数组
+    getNumberList() {
+      let numberArr = Array.from(new Array(10)).map((item, index) => {
+        return index.toString();
+      });
+      let wordArr = Array.from(new Array(26)).map((item, index) => {
+        return String.fromCharCode(index + 65);
+      });
+      wordArr = wordArr.concat(["挂", "领", "港", "澳", "学", "警"]);
+      this.setData({
+        numberList: numberArr,
+        wordList: wordArr
+      });
+    },
+    // 点击获得输入值
+    getValue(e) {
+      let word = e.currentTarget.dataset.value;
+      let {
+        value
+      } = this.data;
+      value = value ? value + word : word;
+      if (value.length == 2) {
+        let charCode = word.charCodeAt();
+        if (charCode < 65 || charCode > 90) {
+          wx.showToast({
+            title: "车牌号的第二位必需是字母",
+            icon: "none"
+          });
+          return;
+        }
+      }
+      this.matchValue(value);
+    },
+    // 判断输入值操作
+    matchValue(value) {
+      if (value && value.length > 8) return;
+      this.setData({
+        value
+      });
+      this.triggerEvent("change", value);
+      if (!this.data.showCompleteButton && value && value.length >= 7) {
+        this.setData({
+          showCompleteButton: true
+        });
+      } else if (this.data.showCompleteButton && value && value.length < 7) {
+        this.setData({
+          showCompleteButton: false
+        });
+      }
+    },
+    // 删除
+    delete() {
+      let {
+        value
+      } = this.data;
+      value = value.slice(0, value.length - 1);
+      this.matchValue(value);
+    },
+    // 关闭键盘
+    onClose() {
+      this.setData({
+        show: false
+      });
+    },
+    antmoveAction: function () {
+      //执行时动态赋值,请勿删除
+    }
+  },
+  observers: {
+    value: function (value) {
+      let showAreaWord = value ? false : true;
+      this.setData({
+        showAreaWord: showAreaWord
+      });
+    },
+    show: function (value) {
+      this.triggerEvent("showChange", value)
+    }
+  },
+  lifetimes: {
+    attached() {
+      this.getNumberList();
+      this.matchValue(this.data.value);
+    }
+  }
+});

+ 4 - 0
components/addCarNumber/index.json

@@ -0,0 +1,4 @@
+{
+	"component": true,
+	"usingComponents": { "van-popup": "vant-aliapp/dist/dist/popup/index" }
+}

+ 40 - 0
components/area-picker/index.acss

@@ -0,0 +1,40 @@
+.area-picker-index {
+    display: block;
+    height: initial;
+}
+/* components/area-picker/index.wxss */
+
+.area-picker-index .picker-box {
+    flex: 1;
+    /* padding-right: 40rpx; */
+    overflow: hidden;
+    position: relative;
+    width: 420rpx;
+}
+
+.area-picker-index .picker-box .picker1 {
+    line-height: 100rpx;
+    font-size: 25rpx;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    overflow: hidden;
+    width: 100%;
+    text-align: right;
+    color: #808080;
+}
+
+/* .picker-box::after {
+	font-family: "cuIcon";
+	display: block;
+	content: "\e6a3";
+	position: absolute;
+	font-size: 34rpx;
+	color: var(--grey);
+	line-height: 100rpx;
+	width: 60rpx;
+	text-align: center;
+	top: 0;
+	bottom: 0;
+	right: -20rpx;
+	margin: auto;
+} */

+ 8 - 0
components/area-picker/index.axml

@@ -0,0 +1,8 @@
+<view class='area-picker-index {{className}}' style='{{style}}' ref='saveChildRef0'>
+  <picker class='picker-box' mode='multiSelector' value='{{valueIndex}}' range='{{addressList}}' range-key='name' onChange='changeValue' onColumnchange='changeColumn'>
+    <view class='picker1'>
+      {{result_show?result_show:'请选择'}}      <van-icon class='icon' name='arrow' ref='saveChildRef1'>
+      </van-icon>
+    </view>
+  </picker>
+</view>

+ 158 - 0
components/area-picker/index.js

@@ -0,0 +1,158 @@
+const {
+    getProvince,
+    getCity,
+    getArea,
+    getStreet
+} = require("../../utils/api/customField");
+
+// components/area-picker/index.js
+Component({
+  options: {
+    lifetimes: true
+  },
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+        content: {
+            type: String,
+            default: null
+        },
+        hasStreet: {
+            type: Boolean,
+            default: false
+        }
+    },
+    /**
+     * 组件的初始数据
+     */
+    data: {
+        addressList: [],
+        valueIndex: [],
+        result: [],
+        result_show: null
+    },
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+        //获取省市区街道列表并赋值
+        async getAddressList(column = -1, index = 0, value) {
+            let { addressList, valueIndex, result, result_show } = this.data;
+            if (column <= -1) {
+                await getProvince().then(provinceList => {
+                    addressList[0] = provinceList.data;
+                    if (value) {
+                        index = provinceList.data.findIndex(item => {
+                            return item.name == value[0];
+                        });
+                        index = index > -1 ? index : 0;
+                    } else {
+                        index = 0;
+                    }
+                });
+            }
+            if (column <= 0) {
+                valueIndex[0] = index;
+                result[0] = addressList[0][index].name;
+                await getCity(addressList[0][index || 0].areaCodeId).then(
+                    cityList => {
+                        addressList[1] = cityList.data;
+                        if (value) {
+                            index = cityList.data.findIndex(item => {
+                                return item.name == value[1];
+                            });
+                            index = index > -1 ? index : 0;
+                        } else {
+                            index = 0;
+                        }
+                    }
+                );
+            }
+            if (column <= 1) {
+                valueIndex[1] = index;
+                result[1] = addressList[1][index].name;
+                await getArea(addressList[1][index || 0].areaCodeId).then(
+                    areaList => {
+                        addressList[2] = areaList.data;
+                        if (value) {
+                            index = areaList.data.findIndex(item => {
+                                return item.name == value[2];
+                            });
+                            index = index > -1 ? index : 0;
+                        } else {
+                            index = 0;
+                        }
+                    }
+                );
+            }
+            if (column <= 2) {
+                valueIndex[2] = index;
+                result[2] = addressList[2][index].name;
+                if (this.data.hasStreet) {
+                    await getStreet(addressList[2][index || 0].areaCodeId).then(
+                        streetList => {
+                            addressList[3] = streetList.data;
+                            if (value) {
+                                index = streetList.data.findIndex(item => {
+                                    return item.name == value[3];
+                                });
+                                index = index > -1 ? index : 0;
+                            } else {
+                                index = 0;
+                            }
+                        }
+                    );
+                }
+            }
+            if (column <= 3 && this.data.hasStreet) {
+                valueIndex[3] = index;
+                result[3] =
+                    addressList[3].length > 0
+                        ? addressList[3][index].name
+                        : "暂无街道";
+            }
+            if (column <= -1 && !value) {
+                result = [];
+                result_show = null;
+            }
+            result_show = result.join("-") || null;
+            this.setData({
+                addressList,
+                valueIndex,
+                result_show
+            });
+            this.triggerEvent("value", result_show);
+        },
+        //改变列时
+        changeColumn(e) {
+            let column = e.detail.column;
+            let index = e.detail.value;
+            this.getAddressList(column, index);
+        },
+        // 点击确定时
+        changeValue(e) {
+            let { valueIndex, result, result_show } = this.data;
+            valueIndex = e.detail.value;
+            valueIndex.forEach((item, index) => {
+                if (this.data.addressList[index][item]) {
+                    result[index] = this.data.addressList[index][item].name;
+                }
+            });
+            result_show = result.join("-");
+            this.setData({
+                valueIndex,
+                result_show
+            });
+            this.triggerEvent("value", result_show);
+        }
+    },
+    lifetimes: {
+        // 组件初始化时
+        attached: async function() {
+            let value = this.data.content;
+            value = value ? value.split("-") : null;
+            this.getAddressList(-1, 0, value);
+        }
+    }
+});

+ 4 - 0
components/area-picker/index.json

@@ -0,0 +1,4 @@
+{
+	"component": true,
+	"usingComponents": { "van-icon": "vant-aliapp/dist/dist/icon/index" }
+}

+ 85 - 0
components/auth-popup/auth-popup.acss

@@ -0,0 +1,85 @@
+.auth-popup-wrap {
+  padding: 24rpx 24rpx 100rpx;
+  background-color: #fff;
+  overflow: hidden;
+}
+
+.auth-popup-wrap .head-layout {
+  display: flex;
+  align-items: center;
+}
+.auth-popup-wrap .head-layout .pic {
+  width: 48rpx;
+  height: 48rpx;
+  background-color: gray;
+  overflow: hidden;
+  border-radius: 50%;
+}
+.auth-popup-wrap .head-layout .name {
+  margin-left: 16rpx;
+  font-weight: 700;
+  font-size: 30rpx;
+  color: #333333;
+}
+.auth-popup-wrap .head-layout .shenqing {
+  margin-left: 40rpx;
+  font-weight: 400;
+  font-size: 30rpx;
+  color: #333333;
+}
+.auth-popup-wrap .head-layout .info {
+  font-weight: 500;
+  font-size: 32rpx;
+  color: #999999;
+  margin-right: 10rpx;
+}
+
+.auth-popup-wrap .title {
+  color: #333333;
+  font-weight: 700;
+  font-size: 36rpx;
+  margin-top: 40rpx;
+}
+.auth-popup-wrap .subtitle {
+  color: #999999;
+  font-weight: 400;
+  font-size: 30rpx;
+  margin-top: 4rpx;
+}
+.auth-popup-wrap .content-layout {
+  background-color: #F5F5F5;
+  border-radius: 16rpx;
+  margin-top: 40rpx;
+  padding: 20rpx 0 20rpx 48rpx;
+  position: relative;
+}
+.auth-popup-wrap .content {
+  color: #333333;
+  font-weight: 400;
+  font-size: 30rpx;
+}
+.auth-popup-wrap .content-layout .content::before {
+  position: absolute;
+  content: '';
+  width: 8rpx;
+  height: 8rpx;
+  background-color: #999999;
+  border-radius: 50%;
+  top: 36rpx;
+  left: 24rpx;
+}
+.auth-popup-wrap .confirm {
+  color: #333333;
+  font-weight: 400;
+  font-size: 30rpx;
+  margin-top: 36rpx;
+}
+
+.auth-popup-wrap .btn-layout {
+  display: flex;
+  margin-top: 38rpx;
+  justify-content: space-between;
+}
+.auth-popup-wrap button {
+  flex: auto;
+}

+ 31 - 0
components/auth-popup/auth-popup.axml

@@ -0,0 +1,31 @@
+<view>
+  <van-popup
+    show='{{ show }}'
+    position='bottom'
+    round
+    onClose="onClose"
+    overlay-style="background:rgba(0,0,0,0.4);"
+    custom-style='height: auto;'>
+    <view class="auth-popup-wrap">
+      <view class="head-layout">
+        <image mode="scaleToFill" src="/static/auth/icon-head.png" class="pic" />
+        <text class="name">{{ name || '小程序名称' }}</text>
+        <text class="shenqing">申请</text>
+        <view style="flex:auto;"/>
+        <view onTap='gotoInfo'>
+          <text class="info">详情</text>
+          <van-icon size="13px" color="#333333" name='arrow' custom-style="margin-top:4rpx;"/>
+        </view>
+      </view>
+      <view class="title">获取以下权限</view>
+      <view class="subtitle">用于为您提供本应用当前服务</view>
+      <view class="content-layout"><text class="content">获取你的证件号、姓名和手机号码</text></view>
+      <view class="confirm">同意<text style="color:#1677FF;" onTap="protocol" data-type="{{protocolEnum.authAgreement}}">《用户授权协议》</text></view>
+      <view class="btn-layout">
+        <button size="default" onTap="onClose">拒绝</button>
+        <view style="flex:none;width:24rpx;"/>
+        <button size="default" type="primary" onTap="getAuth">同意</button>
+      </view>
+    </view>
+  </van-popup>
+</view>

+ 38 - 0
components/auth-popup/auth-popup.js

@@ -0,0 +1,38 @@
+const getThree = require("/utils/getThree/zfb_getThree")
+import { protocolEnum, protocolNavigateTo } from '/utils/common/protocol'
+
+Component({
+  data: {
+    name: null,
+    show: false,
+    protocolEnum: protocolEnum
+  },
+  props: {},
+  methods: {
+    open(name) {
+      this.setData({
+        show: true
+      })
+      if(name) {
+        this.setData({
+          name
+        })
+      }
+    },
+    onClose() {
+      this.setData({ show: false })
+    },
+    gotoInfo() {
+      // this.onClose()
+    },
+    protocol(e) {
+      protocolNavigateTo(e.currentTarget.dataset.type)
+    },
+    getAuth() {
+      this.onClose()
+      getThree((authResult) => {
+        this.triggerEvent('authResult', authResult)
+      })
+    }
+  }
+})

+ 8 - 0
components/auth-popup/auth-popup.json

@@ -0,0 +1,8 @@
+{
+  "component": true,
+  "styleIsolation": "apply-shared",
+  "usingComponents": {
+    "van-popup": "vant-aliapp/dist/dist/popup/index",
+    "van-icon": "vant-aliapp/dist/dist/icon/index"
+  }
+}

+ 55 - 0
components/auth_self/auth_self.acss

@@ -0,0 +1,55 @@
+.as-container {
+  padding: 28rpx 28rpx 0;
+}
+
+.as-container .auth-layout {
+  padding: 50rpx 36rpx 40rpx;
+  width: calc(100% - 72rpx);
+  background-color: #fff;
+  border-radius: 6rpx;
+  display: flex;
+  flex-direction: column;
+  align-items: flex-start;
+}
+
+.as-container .auth-layout .title {
+  font-size: 36rpx;
+  font-weight: 500;
+  line-height: 54rpx;
+  color: #333333;
+}
+
+.protocol {
+  margin-top: 110rpx;
+  color: #B1B1B1;
+  font-weight: 400;
+  font-size: 28rpx;
+  line-height: 40rpx;
+  display: flex;
+  align-items: center;
+}
+.protocol .protocol-top {
+  color: #1677FF;
+}
+
+.submit-btn {
+  margin-top: 38rpx;
+  width: 100%;
+  height: 98rpx;
+  border-radius: 16rpx;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  font-weight: 400;
+  font-size: 36rpx;
+  border: none;
+  color: #ffffff;
+  background-color: #1677FF;
+}
+.btn-disabled {
+  color: #B1B1B1;
+  background-color: #F2F2F2;
+}
+.btn-hover {
+  opacity: 0.6;
+}

+ 11 - 0
components/auth_self/auth_self.axml

@@ -0,0 +1,11 @@
+<view class="as-container">
+  <auth-popup id="authPopup" onAuthResult="authResult"/>
+  <view class="auth-layout">
+    <view class="title">为了给您提供更好的服务,我们需要向您申请授权使用您的个人信息。</view>
+    <view class="protocol">
+      <custom-checkbox checked={{ protocolAgree }} onChange="protocolChange"></custom-checkbox>
+      &nbsp;我已阅读并同意<text class="protocol-top" data-type="personalRules" onTap="protocol" a:if="{{ false }}">《用户协议》</text>及<text class="protocol-top" data-type="privacyPolicy" onTap="protocol">《隐私政策》</text>
+    </view>
+    <view class="submit-btn {{ !protocolAgree ? 'btn-disabled' : null }}" hover-class="{{ protocolAgree ? 'btn-hover' : null }}" hover-stay-time="100" onTap="authClick">一键授权</view>
+  </view>
+</view>

+ 46 - 0
components/auth_self/auth_self.js

@@ -0,0 +1,46 @@
+Component({
+  data: {
+    protocolAgree: false
+  },
+  methods: {
+    protocolChange(data) {
+      this.setData({
+        protocolAgree: data
+      })
+    },
+    authClick() {
+      if(!this.data.protocolAgree) {
+        return
+      }
+      const authPopup = this.$selectComponent('#authPopup')
+      authPopup.open('芯易行通行管理系统')
+    },
+    protocol(e) {
+      if(e.currentTarget.dataset.type === 'privacyPolicy') {
+        my.ap.openURL({
+          url: 'https://render.alipay.com/p/yuyan/180020010001104047/index.html?appid=2021003181682188',
+        })
+      }
+    },
+    // 授权获取三要素结果
+    async authResult(e) {
+      if(e.detail && e.detail.code === 200) {
+        const params = {
+          userId: e.detail.data.userId,
+          username: e.detail.data.username,
+          idNumber: e.detail.data.idNumber,
+          phone: e.detail.data.phone,
+          avatar: e.detail.data.avatar || null,
+          personPictures: e.detail.data.personPictures || null,
+          photoBase64: e.detail.data.photoBase64 || null
+        }
+        this.triggerEvent("updateState", params)
+      } else {
+        my.alert({
+          title: '提示',
+          content: '身份授权认证失败!'
+        })
+      }
+    }
+  }
+})

+ 8 - 0
components/auth_self/auth_self.json

@@ -0,0 +1,8 @@
+{
+  "component": true,
+  "usingComponents": {
+    "auth-popup": "../../components/auth-popup/auth-popup",
+    "custom-checkbox": "../../components/custom-checkbox/custom-checkbox"
+  },
+  "styleIsolation": "apply-shared"
+}

+ 40 - 0
components/autoAdd/index.acss

@@ -0,0 +1,40 @@
+.autoAdd-index {
+    display: block;
+    height: initial;
+}
+/* components/autoAdd/index.wxss */
+
+.autoAdd-index .input {
+    padding-right: 0;
+}
+
+.autoAdd-index .title-area {
+    display: flex;
+    justify-content: flex-start;
+    align-items: center;
+}
+
+.autoAdd-index .icon {
+    font-size: 50rpx;
+    padding: 0 10rpx;
+}
+
+.autoAdd-index .blue {
+    color: #6eaaff;
+}
+
+.autoAdd-index .red {
+    color: #f47f73;
+}
+
+.autoAdd-index .margin-left-sm {
+    margin-left: 20rpx;
+}
+
+.autoAdd-index .text-green {
+    color: green;
+}
+
+.autoAdd-index .text-red {
+    color: red;
+}

+ 38 - 0
components/autoAdd/index.axml

@@ -0,0 +1,38 @@
+<view class='autoAdd-index {{className}}' style='{{style}}' ref='saveChildRef0'>
+  <van-cell a:for='{{list}}' border='{{ false }}' ref-numbers='{{list}}' ref='saveChildRef1'>
+    <view slot='title' class='title-area'>
+      <text class="{{list[index]?'text-green':'text-red'}}">
+        *
+      </text>
+      <text class='van-cell-text'>
+        {{international.invited_personnel[language]}} {{index+1}}
+      </text>
+      <van-icon
+        a:if='{{list.length > 1}}'
+        class='icon red'
+        name='clear'
+        data-index='{{index}}'
+        onClick='delete'
+        ref='saveChildRef2'
+      >
+      </van-icon>
+      <van-icon
+        a:if='{{index+1 === list.length&& showAddBut }}'
+        class='icon blue'
+        name='add'
+        onClick='add'
+        ref='saveChildRef3'
+      >
+      </van-icon>
+    </view>
+    <custom-input
+      class='input'
+      type='number'
+      placeholder='{{international.enter_phone_number[language]}}'
+      value='{{list[index]}}'
+      data-index='{{index}}'
+      onInput='getValue'
+    >
+    </custom-input>
+  </van-cell>
+</view>

+ 91 - 0
components/autoAdd/index.js

@@ -0,0 +1,91 @@
+// components/autoAdd/index.js
+import international from "../../international/appointment_scence/index";
+Component({
+  options: {
+    observers: true
+  },
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+        // 显示标题
+        label: {
+            type: String,
+            value: "受邀人员"
+        },
+        //placeholder
+        placeholder: {
+            type: String,
+            value: "请输入手机号"
+        },
+        language: {
+            type: String,
+            value: "ch"
+        },
+        showAddBut: {
+            type: Boolean
+        },
+        closeNum: {
+            type: false
+        }
+    },
+    /**
+     * 组件的初始数据
+     */
+    data: {
+        international: international,
+        //国际化语言包
+        list: [""]
+    },
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+        // 增加一行
+        add(e) {
+            let { list } = this.data;
+            list.push("")
+            this.setData({
+                list
+            });
+        },
+        //删除一行
+        delete(e) {
+            let { list } = this.data;
+            list.splice(e.currentTarget.dataset.index, 1);
+            this.setData({
+                list
+            });
+        },
+        //获得用户输入
+        getValue(e) {
+            var { list } = this.data;
+            const index = "list[" + e.currentTarget.dataset.index + "]";
+            this.setData({
+              [index]: e.detail.value
+            });
+            list = this.data.list.filter(value => {
+                if (value != "") {
+                    return value;
+                }
+            });
+            this.triggerEvent("change", Array.from(new Set(list)));
+        }
+    },
+    observers: {
+        showAddBut: function(showAddBut) {
+            if (!showAddBut) {
+                this.setData({
+                    list: [""]
+                });
+            }
+        },
+        closeNum: function(closeNum) {
+            if (closeNum) {
+                this.setData({
+                    list: [""]
+                });
+            }
+        }
+    }
+});

+ 8 - 0
components/autoAdd/index.json

@@ -0,0 +1,8 @@
+{
+	"component": true,
+	"usingComponents": {
+		"van-cell": "vant-aliapp/dist/dist/cell/index",
+		"van-icon": "vant-aliapp/dist/dist/icon/index",
+		"custom-input": "../../__antmove/component/custom-input/custom-input"
+	}
+}

BIN
components/catchFace/image/shelter.png


BIN
components/catchFace/image/shelter_fake.png


+ 42 - 0
components/catchFace/index.acss

@@ -0,0 +1,42 @@
+.catchFace-index {
+    display: block;
+    height: initial;
+}
+/* components/catchFace/index.wxss */
+
+.catchFace-index .box {
+    position: relative;
+    width: 100%;
+    height: 100vh;
+    overflow: hidden;
+}
+
+.catchFace-index .shelter {
+    position: absolute;
+    top: 0;
+    width: 100%;
+    z-index: 100;
+}
+
+.catchFace-index .tip {
+    position: absolute;
+    width: 100%;
+    top: 40px;
+    font-size: 20px;
+    color: black;
+    font-weight: 700;
+    text-align: center;
+    z-index: 999;
+}
+
+.catchFace-index .camera {
+    z-index: 10;
+}
+
+.catchFace-index .photo {
+    position: absolute;
+    width: 100%;
+    height: 116vw;
+    top: 0;
+    z-index: 50;
+}

+ 16 - 0
components/catchFace/index.axml

@@ -0,0 +1,16 @@
+<view class='catchFace-index {{className}}' style='{{style}}' ref='saveChildRef0'>
+  <view class='box'>
+    <camera a:if='{{src == null}}' class='camera' device-position='front' frame-size='small' style='width: 100%; height: 116vw;'>
+    </camera>
+    <image mode='widthFix' class='shelter' src="{{fake?'./image/shelter_fake.png':'./image/shelter.png'}}">
+    </image>
+    <view class='tip' a:if='{{!fake}}'>
+      {{tip}}{{countNumber?'('+countNumber+')':''}}
+    </view>
+    <image class='photo' src='{{src}}'>
+    </image>
+    <btn class='btn primary-style' type='primary' a:if='{{fake}}'>
+      点击拍摄
+    </btn>
+  </view>
+</view>

+ 181 - 0
components/catchFace/index.js

@@ -0,0 +1,181 @@
+const _my = require("../../__antmove/api/index.js")(my);
+const wx = _my;
+const { throttle } = require("./util/throttle");
+
+// components/catchFace/index.js
+Component({
+  options: {
+    lifetimes: true
+  },
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+        countDown: {
+            type: Number,
+            value: 4
+        },
+        fake: {
+            type: Boolean,
+            value: true
+        }
+    },
+    /**
+     * 组件的初始数据
+     */
+    data: {
+        tip: "请保持人脸在正中心位置",
+        src: null,
+        state: false,
+        timer: null,
+        countNumber: null,
+        interval: null
+    },
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+        // 打开摄像机监听器
+        async listeningFace() {
+            const that = this;
+            await wx.initFaceDetect();
+            const camera = wx.createCameraContext();
+            const listener = camera.onCameraFrame(frame => {
+                wx.faceDetect({
+                    frameBuffer: frame.data,
+                    width: frame.width,
+                    height: frame.height,
+                    enablePoint: true,
+                    enableConf: true,
+                    enableAngle: true,
+                    enableMultiFace: false,
+                    success: faceData => {
+                        that.judgeFace(faceData);
+                    },
+                    fail() {
+                        that.data.state = false;
+                        that.setData({
+                            tip: "未检测到人脸"
+                        });
+                    },
+                    complete() {
+                        that.judgeMove(camera, listener, that.data.countDown);
+                    }
+                });
+            });
+            listener.start();
+        },
+        //判断人脸是否符合标准
+        judgeFace: throttle(function(faceData) {
+            if (faceData.detectRect.height < 170) {
+                this.setData({
+                    tip: "请靠近一点"
+                });
+                this.data.state = false;
+                return;
+            }
+            if (faceData.detectRect.height > 220) {
+                this.setData({
+                    tip: "请离远一点"
+                });
+                this.data.state = false;
+                return;
+            }
+            if (faceData.confArray.global < 0.8) {
+                this.setData({
+                    tip: "请勿遮挡脸部"
+                });
+                this.data.state = false;
+                return;
+            }
+            if (
+                faceData.confArray.leftEye < 0.8 ||
+                faceData.confArray.rightEye < 0.8
+            ) {
+                this.setData({
+                    tip: "请勿遮挡眼睛"
+                });
+                this.data.state = false;
+                return;
+            }
+            if (
+                Math.abs(faceData.angleArray.pitch) > 0.2 ||
+                Math.abs(faceData.angleArray.yaw) > 0.2 ||
+                Math.abs(faceData.angleArray.roll) > 0.1
+            ) {
+                this.setData({
+                    tip: "请正视屏幕"
+                });
+                this.data.state = false;
+                return;
+            }
+            this.setData({
+                tip: "请保持不动,正在抓拍中"
+            });
+            this.data.state = true;
+            return;
+        }, 500),
+        //判断人脸是否相对静止,防止拍的照片模糊
+        judgeMove(camera, listener, duration) {
+            if (this.data.state === true) {
+                if (this.data.timer === null) {
+                    this.countDown(duration);
+                    this.data.timer = setTimeout(() => {
+                        this.doTakePhoto(camera, listener);
+                    }, duration * 1000);
+                }
+            } else {
+                clearTimeout(this.data.timer);
+                clearInterval(this.data.interval);
+                this.data.timer = null;
+                this.data.interval = null;
+                this.setData({
+                    countNumber: null
+                });
+            }
+        },
+        //抓拍倒计时
+        countDown(count) {
+            this.data.interval = setInterval(() => {
+                if (count <= 0) {
+                    clearInterval(this.data.interval);
+                    this.data.interval = null;
+                    this.setData({
+                        countNumber: null
+                    });
+                } else {
+                    count--;
+                    this.setData({
+                        countNumber: count
+                    });
+                }
+            }, 1000);
+        },
+        //抓拍照片
+        doTakePhoto(camera, listener) {
+            console.log("okkk");
+            const that = this;
+            camera.takePhoto({
+                success(photo) {
+                    that.setData({
+                        src: photo.tempImagePath,
+                        tip: "抓拍成功",
+                        countNumber: null
+                    });
+                    listener.stop();
+                    that.triggerEvent("getPhoto", photo.tempImagePath);
+                },
+                fail(err) {
+                    console.log(err);
+                }
+            });
+        }
+    },
+    //钩子
+    lifetimes: {
+        attached: function() {
+            this.listeningFace();
+        },
+        detached: function() {}
+    }
+});

+ 4 - 0
components/catchFace/index.json

@@ -0,0 +1,4 @@
+{
+	"component": true,
+	"usingComponents": { "btn": "../../__antmove/component/btn/btn" }
+}

+ 21 - 0
components/catchFace/util/throttle.js

@@ -0,0 +1,21 @@
+const _my = require("../../../__antmove/api/index.js")(my);
+const wx = _my;
+const throttle = function(func, duration) {
+    let start = 0;
+    return function() {
+        let that = this;
+        let now = Date.now();
+        if (now - start > duration) {
+            func.apply(that, arguments);
+            start = now;
+        } else {
+            // wx.showToast({
+            //   title: `您的操作太频繁啦,请在${Math.ceil(duration/1000)}秒后再试哦~`,
+            //   icon: 'none'
+            // })
+        }
+    };
+};
+module.exports = {
+    throttle
+};

+ 10 - 0
components/custom-checkbox/custom-checkbox.acss

@@ -0,0 +1,10 @@
+.cc-wrap {
+  display: inline;
+  overflow: hidden;
+  width: 40rpx;
+  height: 40rpx;
+}
+.cc-wrap .ck-image {
+  width: 40rpx;
+  height: 40rpx;
+}

+ 3 - 0
components/custom-checkbox/custom-checkbox.axml

@@ -0,0 +1,3 @@
+<view class="cc-wrap" onTap="change">
+  <image mode="scaleToFill" src="/static/auth/icon-radio{{ mChecked ? '-selected' : '' }}.png" class="ck-image" />
+</view>

+ 30 - 0
components/custom-checkbox/custom-checkbox.js

@@ -0,0 +1,30 @@
+Component({
+  props: {
+    checked: {
+      type: Boolean,
+      default: false
+    },
+    onChange: {
+      type: Function,
+      default: () => {}
+    }
+  },
+  data: {
+    mChecked: false
+  },
+  methods: {
+    change() {
+      this.setData({
+        mChecked: !this.data.mChecked
+      })
+      this.props.onChange(this.data.mChecked)
+    }
+  },
+  rootEvents: {
+    onReady() {
+      this.setData({
+        mChecked: this.props.checked
+      })
+    }
+  }
+})

+ 4 - 0
components/custom-checkbox/custom-checkbox.json

@@ -0,0 +1,4 @@
+{
+  "component": true,
+  "styleIsolation": "apply-shared"
+}

Some files were not shown because too many files changed in this diff