函数:VPNVersions 获取版本号

函数名称:获取版本号

函数功能:获取插件版本号

函数方法

local bkvs = VPNVersions()

返回值 类型 说明
bkvs string 插件版本号,如:1.0.0

函数用例

function file_exists(file_name) --检测指定文件是否存在
    local f = io.open(file_name, "r")
    return f ~= nil and f:close()
end
if  file_exists(userPath().."/plugin/vpncfg.tsl") == false then
    dialog("库文件不存在,请手动导入 vpncfg.tsl 文件到"..userPath().."/plugin目录下", 0)
    lua_exit()
end
local tsld = loadTSLibrary("vpncfg.tsl") --库加载,返回一个 table
if tsld.granted == 0 then
    dialog("插件未授权!", 0)
    return
end
if tsld.status == 0 then --验证判断
    dialog("插件加载异常", 0)
    return
end
require("vpncfg") --需要加载
--以上代码请在脚本开头先调用验证加载,只需加载一次
local vpnvs = VPNVersions()
dialog(vpnvs, 0)
Copyright 北京帮你玩科技有限公司 2023 all right reserved,powered by Gitbook该文章修订时间: 2024-03-06 17:50:18

results matching ""

    No results matching ""