schema吊起支付宝微信

1,071 阅读1分钟
       openWxOrAlipay(event) {
            // const pageX = event.pageX;
            // const pageY = event.pageY;
            // const channelType = this.channelType;
            // if((channelType === 'alipay') && this.inHotArea(pageX, pageY)) {
            //     // this.callApp(`alipays://`)
            // } else if ((channelType === 'weChat') && this.inHotArea(pageX, pageY)) {
            //     // this.callApp(`weixin://`)
            // }
        },
        callApp(url) {
            let iframe = document.getElementById('iframe');
            iframe.src = scheme;
        },
        // 点击触发热区
        inHotArea(pageX, pageY) {
            const left = '';
            const right = '';
            const top = '';
            const bottom = '';
            if ((pageX >= left && pageX <= right) && (pageY >= top && pageY <= bottom)) {
                return true
            } else {
                return false
            }
        },