Compatible with ios Android H5 methods

  1. In H5 and Android, it is possible to judge whether the string is empty or == ===. However, ios cannot correctly judge whether the string is empty and returns false
@param V: Data to be determined * @returns {Boolean} */export function isEmpty(v) {
    switch (typeof v) {
        case 'undefined':
            return true;
        case 'string':
            if (v.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, ' ').length === 0 || v.length === 0 || v == 'null') return true;
            break;
        case 'boolean':
            if(! v)return true;
            break;
        case 'number':
            if (0 === v || isNaN(v)) return true;
            break;
        case 'object':
            if (null === v || v.length === 0) return true;
            for (var i in v) {
                return false;
            }
            return true;
    }
    return false; } strings need to be replaced with Spaces, newlines, etc' ', or obtain data from the interface and replace the default value, which can be processed by the back endCopy the code
  1. When calling THE SDK for parameter transmission, if the requested data is sent back and the ios and Android parameters are sent back to the other party, the data may be processed, causing that the SDK method ios or Android cannot be set up, or the setting up effect is inconsistent with the requirements. After confirming that the parameters are sent back correctly, the other party will process the data

  2. H5 location.search can get the URL question mark (?). After the parameter, but because of the vue # problem, or cause the case is not available

Calling the SDK method

  1. Android may need to install a new package. Ios may have a problem with the parameter passing format. Ios needs to contact the corresponding developer to deal with it
  2. In Android debugging,alert can pop up information, but in ios,alert is invalid, so toast pop up can be used for debugging