zoukankan      html  css  js  c++  java
  • 3DTouch

    一、模块介绍

     代码如下

    <!doctype html>
    <html>
    
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width" />
        <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
        <title>Hello APP</title>
        <link rel="stylesheet" type="text/css" href="./css/api.css" />
        <style type="text/css">
    
        </style>
    </head>
    
    <body class="wrap">
        <header>APICloud</header>
    </body>
    <script type="text/javascript" src="./script/api.js"></script>
    <script type="text/javascript">
        apiready = function() {
            var systemType = api.systemType;
            if (systemType == 'ios') {
                //监听3DTouch
                var Touch3D = api.require('3DTouch');
                Touch3D.setListener(
                    function(ret, err) {
                        var type = ret.type;
                        console.log(JSON.stringify(ret));
                        // if (type == 'com.mycompany.myapp.openfavorites') {
                        //
                        // }
                    }
                );
                // //设置3DTouch的菜单列表
                Touch3D.setShortcutItems({
                    items: [{
                        type: 'com.api.icpntoa.addCustomer',
                        title: '添加新客户',
                        icon: {
                            type: 3
                        },
                        userInfo: {
                            'name': 'addCustomer'
                        }
                    }, {
                        type: 'com.api.icpntoa.viewMoney',
                        title: '查看工资单',
                        icon: {
                            type: 16
                        },
                        userInfo: {
                            'name': 'viewMoney'
                        }
                    }, {
                        type: 'com.api.icpntoa.viewTask',
                        title: '查看待办事项',
                        icon: {
                            type: 22
                        },
                        userInfo: {
                            'name': 'viewTask'
                        }
                    }]
                });
            }
        }
    </script>
    
    </html>

    效果如下:

  • 相关阅读:
    intellij idea
    this.getClass().getResource(String) 路径问题
    org.hibernate.AssertionFailure: null id 错误
    Hibernate 映射
    关于idea 在创建maven 骨架较慢问题解决
    常用base.css
    form表单样式
    ul li自适应居中导航
    table-cell实现未知宽高图片,文本水平垂直居中在div
    多行文字水平垂直居中在div
  • 原文地址:https://www.cnblogs.com/fger/p/13163817.html
Copyright © 2011-2022 走看看