如何将戴尔服务标签转换为快速服务代码?

Tot*_*tor 4 dell

致电戴尔支持时,您通常必须输入系统的“快速服务代码”以通过电话获取技术人员。

这是因为服务标签(= 序列号)不仅由数字组成,而且快速服务代码是(DTMF友好的)。

我只将 ST 存储在我的库存中,那么有没有办法将 Dell ST 转换为快速服务代码?

Tot*_*tor 6

戴尔服务标签只是一个以 36 为基数的数字(10 位数字 + 26 个字母)。如果您将其转换为以 10 为基数的数字,您将获得快速服务代码。

为此,python您可以从控制台输入(感谢 MikeyB):

int("SRVCTAG",36)
Run Code Online (Sandbox Code Playgroud)

此外,这里有一个简单的 PHP 网页,用于执行此操作。

<?php
echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>Conversion Service Tag => Express Service Code (Dell)</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>

<h1>Conversion Service Tag => Express Service Code (Dell)</h1>

<p>
<form action="" method="get">
Service Tag : <input type="text" name="st" value="<?php echo isset($_GET['st']) ? $_GET['st'] : ''; ?>" autofocus="autofocus" />
<input type="submit" value="Get Express SC" />
</form>
</p>

<?php
if( isset($_GET['st']) && ctype_alnum($_GET['st']) && strlen($_GET['st']) == 7 ) {
    $st = strtoupper($_GET['st']);
    $esc = base_convert($st, 36, 10); // convert from base 36 to base 10
    echo "<p>Express Service Code : $esc</p>";
}

?>

</body>
</html>
Run Code Online (Sandbox Code Playgroud)

我在GNU GPL许可证版本 2 或更高版本下许可此代码,以及在 stackexchange 网络上使用许可证,无论您喜欢哪个。

  • 这是 [python 等效项](http://www.techrepublic.com/forums/discussions/dell-express-service-code/post-ae1b85d8-d25e-11e2-bc00-02911874f8c8/):`str(int(service_tag, 36))` (6认同)
  • 我不是律师,但在这里发帖表示您同意服务条款 (http://stackexchange.com/legal/terms-of-service),其中声明您的内容已获得 CC 许可。如果你想要它在 GPL 下,你不应该在这里发布。 (5认同)