PyQt5 JavaScript调用PyQt代码

news2025/7/19 16:52:35

JavaScript调用PyQt代码


JavaScript调用PyQt代码,是指PyQt可以与加载的Web页面进行双向的数据交互。
1.创建QWebChannel对象:
创建QWebChannel对象,注册一个需要桥接的对象,以便Web页面的JavaScript使用。其核心代码如下:

  • channel = QWebChannel()
  • myObj = MySharedObject()
  • channel.registerObject(“bridge”, myObj)
  • view = QWebEngineView()
  • view.page.setWebChannel(channel)
    2.创建共享数据的PyQt对象
    创建的共享数据对象需要继承QWidget或QObject类,其核心代码如下:
from PyQt5.QtCore import QObject
from PyQt5.QtCore import pyqtProperty
from PyQt5.QtWidgets import QWidget, QMessageBox

class MySharedObject(QWidget):

    def __init__(self):
        super(MySharedObject, self).__init__()

    def _getStrValue(self):
        return '100'
    
    def _setStrValue(self, str):
        print('获得页面参数:%s' % str)
        QMessageBox.information(self, "Information", "获得页面参数:%s" %str)
    
    # 需要定义对外发布的方法
    strValue = pyqtProperty(str, fget=_setStrValue, fset=_setStrValue)

PyQtProperty()函数演示:

from PyQt5.QtCore import QObject, pyqtProperty

class MyObject(QObject):
    def __init__(self, inVal=20):
        self.val = inVal

    def readVal(self):
        print('readVal=%s' % self.val)
        return self.val
    
    def setVal(self, val):
        print('setVal=%s' % val)
        self.val = val
    
    ppVal = pyqtProperty(int, readVal, setVal)
    

if __name__ == "__main__":
    obj = MyObject()
    print('\n#1')
    obj.ppVal = 10
    print('\n#2')
    print('obj.ppVal=%s' % obj.ppVal)
    print('obj.readVal()=%s' % obj.readVal())

JavaScript调用PyQt代码演示

import sys
from PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayout
from PyQt5.QtWebEngineWidgets import QWebEngineView
from PyQt5.QtCore import QUrl
from MySharedObject import MySharedObject
from PyQt5.QtWebChannel import QWebChannel

# 创建一个应用实例
app = QApplication(sys.argv)
win = QWidget()
win.setWindowTitle("Web页面中的JavaScript与QWebEngineView交互")

layout = QVBoxLayout()
win.setLayout(layout)

# 创建一个QWebEngineView对象
view = QWebEngineView()
htmlUrl = 'http://127.0.0.1:8848/webdemo/client_index.html'
view.load(QUrl(htmlUrl))

# 创建一个QWebChannel对象,用来传递PyQt的参数到JavaScript
channel = QWebChannel()
myObj = MySharedObject()
channel.registerObject("bridge", myObj)
view.page().setWebChannel(channel)

# 把QWebEngineView控件和button控件加载到layout布局中
layout.addWidget(view)

win.show()
sys.exit(app.exec_())

HBuilder创建web项目:

<!DOCTYPE html>
 <html>
    <head>
      <title>A Demo Page</title>
      <meta charset="UTF-8">
      <script src="./qwebchannel.js"></script>
      <script language="javascript">
        function completeAndReturnName() {
          var fname = document.getElementById('fname').value;
          var lname = document.getElementById('lname').value;
          var full = fname + ' ' + lname;

          document.getElementById('fullname').value = full;
          document.getElementById('submit-btn').style.display = 'block';

          return full;
        }
                      
        document.addEventListener("DOMContentLoaded", function () {
                 	
        	new QWebChannel( qt.webChannelTransport, function(channel) {
	        	//alert('111 channel=' + channel )
	        	
	            window.bridge = channel.objects.bridge;
	            alert('bridge='+bridge+'\n从pyqt传来的参数=' + window.bridge.strValue ) ;
	            
	        });
        });
        
	      function onShowMsgBox() {
	        //alert('window.bridge=' + window.bridge);
	        
	        if ( window.bridge) {
	        	//alert('bridge.strValue=' + window.bridge.strValue ) ;
	            //bridge.sayHello('999')
	            var fname = document.getElementById('fname').value;
	            window.bridge.strValue = fname;
	            
	            
	        }
        	
        }
	          
      
      </script>     
    </head>

    <body>
      <form>
        <label for="姓名">user name:</label>
        <input type="text" name="fname" id="fname"></input>
        <br />
        <input type="button" value="传递参数到pyqt" onclick="onShowMsgBox()">
        <input type="reset" value='重置'/>
      </form>
    </body>
  </html>

页面中引入的qwebchannel.js 脚本,这个脚本是Qt官方提供的:

/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Copyright (C) 2014 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Milian Wolff <milian.wolff@kdab.com>
** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtWebChannel module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** As a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
**
****************************************************************************/

"use strict";

var QWebChannelMessageTypes = {
    signal: 1,
    propertyUpdate: 2,
    init: 3,
    idle: 4,
    debug: 5,
    invokeMethod: 6,
    connectToSignal: 7,
    disconnectFromSignal: 8,
    setProperty: 9,
    response: 10,
};

var QWebChannel = function(transport, initCallback)
{
    if (typeof transport !== "object" || typeof transport.send !== "function") {
        console.error("The QWebChannel expects a transport object with a send function and onmessage callback property." +
                      " Given is: transport: " + typeof(transport) + ", transport.send: " + typeof(transport.send));
        return;
    }

    var channel = this;
    this.transport = transport;

    this.send = function(data)
    {
        if (typeof(data) !== "string") {
            data = JSON.stringify(data);
        }
        channel.transport.send(data);
    }

    this.transport.onmessage = function(message)
    {
        var data = message.data;
        if (typeof data === "string") {
            data = JSON.parse(data);
        }
        switch (data.type) {
            case QWebChannelMessageTypes.signal:
                channel.handleSignal(data);
                break;
            case QWebChannelMessageTypes.response:
                channel.handleResponse(data);
                break;
            case QWebChannelMessageTypes.propertyUpdate:
                channel.handlePropertyUpdate(data);
                break;
            default:
                console.error("invalid message received:", message.data);
                break;
        }
    }

    this.execCallbacks = {};
    this.execId = 0;
    this.exec = function(data, callback)
    {
        if (!callback) {
            // if no callback is given, send directly
            channel.send(data);
            return;
        }
        if (channel.execId === Number.MAX_VALUE) {
            // wrap
            channel.execId = Number.MIN_VALUE;
        }
        if (data.hasOwnProperty("id")) {
            console.error("Cannot exec message with property id: " + JSON.stringify(data));
            return;
        }
        data.id = channel.execId++;
        channel.execCallbacks[data.id] = callback;
        channel.send(data);
    };

    this.objects = {};

    this.handleSignal = function(message)
    {
        var object = channel.objects[message.object];
        if (object) {
            object.signalEmitted(message.signal, message.args);
        } else {
            console.warn("Unhandled signal: " + message.object + "::" + message.signal);
        }
    }

    this.handleResponse = function(message)
    {
        if (!message.hasOwnProperty("id")) {
            console.error("Invalid response message received: ", JSON.stringify(message));
            return;
        }
        channel.execCallbacks[message.id](message.data);
        delete channel.execCallbacks[message.id];
    }

    this.handlePropertyUpdate = function(message)
    {
        for (var i in message.data) {
            var data = message.data[i];
            var object = channel.objects[data.object];
            if (object) {
                object.propertyUpdate(data.signals, data.properties);
            } else {
                console.warn("Unhandled property update: " + data.object + "::" + data.signal);
            }
        }
        channel.exec({type: QWebChannelMessageTypes.idle});
    }

    this.debug = function(message)
    {
        channel.send({type: QWebChannelMessageTypes.debug, data: message});
    };

    channel.exec({type: QWebChannelMessageTypes.init}, function(data) {
        for (var objectName in data) {
            var object = new QObject(objectName, data[objectName], channel);
        }
        // now unwrap properties, which might reference other registered objects
        for (var objectName in channel.objects) {
            channel.objects[objectName].unwrapProperties();
        }
        if (initCallback) {
            initCallback(channel);
        }
        channel.exec({type: QWebChannelMessageTypes.idle});
    });
};

function QObject(name, data, webChannel)
{
    this.__id__ = name;
    webChannel.objects[name] = this;

    // List of callbacks that get invoked upon signal emission
    this.__objectSignals__ = {};

    // Cache of all properties, updated when a notify signal is emitted
    this.__propertyCache__ = {};

    var object = this;

    // ----------------------------------------------------------------------

    this.unwrapQObject = function(response)
    {
        if (response instanceof Array) {
            // support list of objects
            var ret = new Array(response.length);
            for (var i = 0; i < response.length; ++i) {
                ret[i] = object.unwrapQObject(response[i]);
            }
            return ret;
        }
        if (!response
            || !response["__QObject*__"]
            || response.id === undefined) {
            return response;
        }

        var objectId = response.id;
        if (webChannel.objects[objectId])
            return webChannel.objects[objectId];

        if (!response.data) {
            console.error("Cannot unwrap unknown QObject " + objectId + " without data.");
            return;
        }

        var qObject = new QObject( objectId, response.data, webChannel );
        qObject.destroyed.connect(function() {
            if (webChannel.objects[objectId] === qObject) {
                delete webChannel.objects[objectId];
                // reset the now deleted QObject to an empty {} object
                // just assigning {} though would not have the desired effect, but the
                // below also ensures all external references will see the empty map
                // NOTE: this detour is necessary to workaround QTBUG-40021
                var propertyNames = [];
                for (var propertyName in qObject) {
                    propertyNames.push(propertyName);
                }
                for (var idx in propertyNames) {
                    delete qObject[propertyNames[idx]];
                }
            }
        });
        // here we are already initialized, and thus must directly unwrap the properties
        qObject.unwrapProperties();
        return qObject;
    }

    this.unwrapProperties = function()
    {
        for (var propertyIdx in object.__propertyCache__) {
            object.__propertyCache__[propertyIdx] = object.unwrapQObject(object.__propertyCache__[propertyIdx]);
        }
    }

    function addSignal(signalData, isPropertyNotifySignal)
    {
        var signalName = signalData[0];
        var signalIndex = signalData[1];
        object[signalName] = {
            connect: function(callback) {
                if (typeof(callback) !== "function") {
                    console.error("Bad callback given to connect to signal " + signalName);
                    return;
                }

                object.__objectSignals__[signalIndex] = object.__objectSignals__[signalIndex] || [];
                object.__objectSignals__[signalIndex].push(callback);

                if (!isPropertyNotifySignal && signalName !== "destroyed") {
                    // only required for "pure" signals, handled separately for properties in propertyUpdate
                    // also note that we always get notified about the destroyed signal
                    webChannel.exec({
                        type: QWebChannelMessageTypes.connectToSignal,
                        object: object.__id__,
                        signal: signalIndex
                    });
                }
            },
            disconnect: function(callback) {
                if (typeof(callback) !== "function") {
                    console.error("Bad callback given to disconnect from signal " + signalName);
                    return;
                }
                object.__objectSignals__[signalIndex] = object.__objectSignals__[signalIndex] || [];
                var idx = object.__objectSignals__[signalIndex].indexOf(callback);
                if (idx === -1) {
                    console.error("Cannot find connection of signal " + signalName + " to " + callback.name);
                    return;
                }
                object.__objectSignals__[signalIndex].splice(idx, 1);
                if (!isPropertyNotifySignal && object.__objectSignals__[signalIndex].length === 0) {
                    // only required for "pure" signals, handled separately for properties in propertyUpdate
                    webChannel.exec({
                        type: QWebChannelMessageTypes.disconnectFromSignal,
                        object: object.__id__,
                        signal: signalIndex
                    });
                }
            }
        };
    }

    /**
     * Invokes all callbacks for the given signalname. Also works for property notify callbacks.
     */
    function invokeSignalCallbacks(signalName, signalArgs)
    {
        var connections = object.__objectSignals__[signalName];
        if (connections) {
            connections.forEach(function(callback) {
                callback.apply(callback, signalArgs);
            });
        }
    }

    this.propertyUpdate = function(signals, propertyMap)
    {
        // update property cache
        for (var propertyIndex in propertyMap) {
            var propertyValue = propertyMap[propertyIndex];
            object.__propertyCache__[propertyIndex] = propertyValue;
        }

        for (var signalName in signals) {
            // Invoke all callbacks, as signalEmitted() does not. This ensures the
            // property cache is updated before the callbacks are invoked.
            invokeSignalCallbacks(signalName, signals[signalName]);
        }
    }

    this.signalEmitted = function(signalName, signalArgs)
    {
        invokeSignalCallbacks(signalName, signalArgs);
    }

    function addMethod(methodData)
    {
        var methodName = methodData[0];
        var methodIdx = methodData[1];
        object[methodName] = function() {
            var args = [];
            var callback;
            for (var i = 0; i < arguments.length; ++i) {
                if (typeof arguments[i] === "function")
                    callback = arguments[i];
                else
                    args.push(arguments[i]);
            }

            webChannel.exec({
                "type": QWebChannelMessageTypes.invokeMethod,
                "object": object.__id__,
                "method": methodIdx,
                "args": args
            }, function(response) {
                if (response !== undefined) {
                    var result = object.unwrapQObject(response);
                    if (callback) {
                        (callback)(result);
                    }
                }
            });
        };
    }

    function bindGetterSetter(propertyInfo)
    {
        var propertyIndex = propertyInfo[0];
        var propertyName = propertyInfo[1];
        var notifySignalData = propertyInfo[2];
        // initialize property cache with current value
        // NOTE: if this is an object, it is not directly unwrapped as it might
        // reference other QObject that we do not know yet
        object.__propertyCache__[propertyIndex] = propertyInfo[3];

        if (notifySignalData) {
            if (notifySignalData[0] === 1) {
                // signal name is optimized away, reconstruct the actual name
                notifySignalData[0] = propertyName + "Changed";
            }
            addSignal(notifySignalData, true);
        }

        Object.defineProperty(object, propertyName, {
            configurable: true,
            get: function () {
                var propertyValue = object.__propertyCache__[propertyIndex];
                if (propertyValue === undefined) {
                    // This shouldn't happen
                    console.warn("Undefined value in property cache for property \"" + propertyName + "\" in object " + object.__id__);
                }

                return propertyValue;
            },
            set: function(value) {
                if (value === undefined) {
                    console.warn("Property setter for " + propertyName + " called with undefined value!");
                    return;
                }
                object.__propertyCache__[propertyIndex] = value;
                webChannel.exec({
                    "type": QWebChannelMessageTypes.setProperty,
                    "object": object.__id__,
                    "property": propertyIndex,
                    "value": value
                });
            }
        });

    }

    // ----------------------------------------------------------------------

    data.methods.forEach(addMethod);

    data.properties.forEach(bindGetterSetter);

    data.signals.forEach(function(signal) { addSignal(signal, false); });

    for (var name in data.enums) {
        object[name] = data.enums[name];
    }
}

//required for use with nodejs
if (typeof module === 'object') {
    module.exports = {
        QWebChannel: QWebChannel
    };
}

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/37816.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

JUC并发编程与源码分析笔记01-本课程前置知识及要求说明

JUC是什么 JUC是指java.util.concurrent包&#xff0c;在并发编程中广泛使用。 官方文档搜索java.util.concurrent&#xff0c;可以看到有java.util.concurrent、java.util.concurrent。atomic、java.util.concurrent.locks。 本课程学生对象&#xff08;非零基础&#xff09…

记 linux 系统编译好的exp提权提示无gcc

文章目录CVE-2021-4034 漏洞 polkit 提权在目标linux主机没有gcc的情况下提权&#xff0c;在很多情况下的一些内核漏洞需要在目标主机上使用gcc编译才可以正常运行&#xff0c;在本地编译好的exp如果本地系统与目标主机系统不一致&#xff0c;上传执行很大机会导致系统崩溃如脏…

糟了,线上服务出现OOM了

前言 前一段时间&#xff0c;公司同事的一个线上服务OOM的问题&#xff0c;我觉得挺有意思的&#xff0c;在这里跟大家一起分享一下。 我当时其实也参与了一部分问题的定位。 1 案发现场 他们有个mq消费者服务&#xff0c;在某一天下午&#xff0c;出现OOM了&#xff0c;导…

docker技术简介

目录 概念 命令 数据卷 DockerFile 应用部署 服务编排 私有仓库 概念 Docker 是一个开源的应用容器引擎&#xff0c;而容器技术是一种轻量级虚拟化方案&#xff08;虚拟机太繁重了不够轻量级&#xff09;&#xff0c;Docker的基础是Linux容器&#xff08;LXC&#xff09…

离线安装ceph集群(ceph-13.2.10)

记录&#xff1a;332 场景&#xff1a;在CentOS 7.9操作系统上&#xff0c;使用ceph的rpm-mimic的ceph-13.2.10安装ceph集群。应用ceph对象存储(ceph object store)&#xff1b;应用ceph块设备(ceph block device)&#xff1b;应用ceph文件系统(ceph file system)。 版本&…

数据结构(5)树形结构——二叉搜索树(JAVA代码实现)

5.1.概述 二叉搜索树&#xff0c;也叫二叉查找树、二叉排序树&#xff0c;顾名思义&#xff0c;这种二叉树是专门用来进行数据查找的二叉树。二叉搜索树的查找其实就是二分查找。 二叉搜索树的定义&#xff1a; 二叉搜索树可以为空如果二叉搜索树不为空&#xff0c;那么每个…

Design Compiler工具学习笔记(7)

目录 引言 背景知识 多时钟设计 DC 输出文件分析 实际操作 设计源码 综合脚本 综合网表 SDF文件 SDC文件 REPORT文件 引言 本篇继续学习 DC的基本使用。本篇主要学习 DC 综合之后的效果分析&#xff0c;多同步时钟设计以及 DC 综合完成之后的各种输出文件。 前文链…

微信小程序开发基础(03视图与逻辑)

学习目标 能够知道如何实现页面之间的导航跳转 能够知道如何实现下拉刷新效果 能够知道如何实现上拉加载更多效果 能够知道小程序中常用的生命周期函数 页面导航 1. 什么是页面导航 页面导航指的是页面之间的相互跳转。例如&#xff0c;浏览器中实现页面导航的方式有如下两…

关于环境保护html网页设计完整版,5个以环境为主题的网页设计与实现

&#x1f380; 精彩专栏推荐&#x1f447;&#x1f3fb;&#x1f447;&#x1f3fb;&#x1f447;&#x1f3fb; ✍️ 作者简介: 一个热爱把逻辑思维转变为代码的技术博主 &#x1f482; 作者主页: 【主页——&#x1f680;获取更多优质源码】 &#x1f393; web前端期末大作业…

《剑指 Offer 》—50. 第一个只出现一次的字符

《剑指 Offer 》—50. 第一个只出现一次的字符 一、题目内容 原题连接&#xff1a;https://leetcode.cn/problems/di-yi-ge-zhi-chu-xian-yi-ci-de-zi-fu-lcof/description/ 题目&#xff1a;在字符串 s 中找出第一个只出现一次的字符。如果没有&#xff0c;返回一个单空格。…

【专栏】核心篇06| Redis 存储高可用背后的模式

关注公众号 【离心计划】呀&#xff0c;一起逃离地球表面 Redis专栏合集 【专栏】01| Redis夜的第一章 【专栏】基础篇02| Redis 旁路缓存的价值 【专栏】基础篇03| Redis 花样的数据结构 【专栏】基础篇04| Redis 该怎么保证数据不丢失&#xff08;上&#xff09; 【专栏…

RabbitMQ------发布确认高级(消息回调、回退、备份交换机)(八)

RabbitMQ------发布确认高级&#xff08;八&#xff09; 可能由于某些意外情况&#xff0c;导致RabbitMQ重启&#xff0c;在RabbitMQ重启过程中&#xff0c;生产者投递消息失败&#xff0c;导致消息丢失。 如果才能够保证RabbitMQ的消息可靠性呢&#xff1f; 可能出现两种问题…

大数据毕设选题 - 深度学习火焰识别检测系统(python YOLO)

文章目录0 前言1 基于YOLO的火焰检测与识别2 课题背景3 卷积神经网络3.1 卷积层3.2 池化层3.3 激活函数&#xff1a;3.4 全连接层3.5 使用tensorflow中keras模块实现卷积神经网络4 YOLOV54.1 网络架构图4.2 输入端4.3 基准网络4.4 Neck网络4.5 Head输出层5 数据集准备5.1 数据标…

CSRF漏洞简介

今天继续给大家介绍渗透测试相关知识&#xff0c;本文主要内容是CSRF漏洞原理、产生与危害。 免责声明&#xff1a; 本文所介绍的内容仅做学习交流使用&#xff0c;严禁利用文中技术进行非法行为&#xff0c;否则造成一切严重后果自负&#xff01; 再次强调&#xff1a;严禁对未…

Maven——分模块开发与设计(重点)

目录 一、模块拆分 1.1 模块拆分思想 1.2 pojo模块拆分 1.3 dao模块拆分 1.4 service模块拆分 1.5 controller模块拆分 二、 聚合——模块聚合 三、继承——模块继承 一、模块拆分 1.1 模块拆分思想 左侧&#xff1a;我们从前的架构&#xff0c;一个人独立做的所有工作文件…

shell脚本的条件判断1:字符串和数字和比较

前言 写脚本时&#xff0c;为了让脚本更接近人类思考问题的方式&#xff0c;可以对各种情况进行判断。例如&#xff0c;经常需要判断某些条件是否成立&#xff0c;如果条件成立该如何处理&#xff0c;如果条件不成立又该如何处理&#xff0c;这些都可以通过Shell脚本的if语句结…

大数据_什么是数据中台?

目录 一、数据中台的定义 二、数据中台必备的是个核心能力 三、数据中台VS业务中台 四、数据中台VS数据仓库 五、数据中台VS现有信息架构 六、数据中台的业务价值与技术价值 一、数据中台的定义 数据中台是一套可持续“让企业的数据用起来”的机制&#xff0c;是一种战略…

vm的生命周期钩子

vm的生命周期钩子&#xff08;共11个&#xff09;&#xff1a; 前8个&#xff1a; 将要创建>调用beforeCreate函数 创建完毕>调用created函数 将要挂载>调用beforeMount函数 &#xff08;重要&#xff09;挂载完毕>调用mounted函数>【重要钩子】 将要更新…

用户画像洞察分类模型 - 前端页面展示

文章目录一、前端与数据智能二、 体验优化需求场景跳失预测交互偏好智能 UI三、 关键技术鲸幂 UICook&#xff08;智能UI&#xff09;DataCookPipCookPipeline四、 体验优化实践数据智能实践的一般流程数据采集数据分析 -如何对数据进行分析处理并得出结论数据应用 - 分析结论如…

【C++】string类接口的了解和使用

为什么我们要学string类呢&#xff1f;那是必须是为了方便啊&#xff01;在C语言中&#xff0c;我们创建一个字符串&#xff0c;有很多操作或者必须要注意的细节会把控不住&#xff0c;所以C中出现了string类&#xff0c;让我们应对字符串等oj题也方便快捷了许多&#xff01; 目…