Quick app (qapp) several deeplink startup methods

  • Quick app debugger and previewer download URL .

  • Formats and documents supported by deeplink:

    • http://hapjs.org/app/<package>/[path][?key=value]
    • https://hapjs.org/app/<package>/[path][?key=value]
    • hap://app/<package>/[path][?key=value]
  • hap link usage documentation:

    • hap://app/<package>/[path][?key=value]
    • hap://game/<package>/[path][?key=value]

    This method may have different restrictions on this capability in different manufacturers, please confirm with the corresponding manufacturer before using it.

  • Start parameter reception, cannot receive parameters app.uxin , can only go to the page to get

    • 方式一: The quick publicapp keyobtains external parameters through the attribute with the same name as the definition. If the parameter keyis not declared, publicthis attribute will not be added, and the value of this attribute cannot be obtained.

      // 快应用获取 key-value
      export default {
              
              
        public: {
              
              
          key: null
        },
        onShow() {
              
              
          console.log(this.key)
        }
      }
      
    • 方式二: onInitGet .

       // 快应用获取 key-value
      export default {
              
              
        // 页面初始化
        onInit (options) {
              
              
          // 会获得所有参数,不管声明或未声明的都在对象里面
          console.log(options)
        }
      }
      

Guess you like

Origin blog.csdn.net/zz00008888/article/details/129838053