测试工程师与AI chatGPT,编写python读取xmind测试用例chatgtp+python+xmind

背景

有用xmind写测试用例的吧,统计一个xmind的条,需要花大量的时间,还有要统计有多少条冒烟的,多少条不通过的,还有通过的条数。

需求

快速使用python,写一个简单的脚本,统计所有xmind节点,分别统计出,冒烟,通过,不通过的条数

方案

使用chatGPT编写python脚本,通过脚本读取xmind文件,统计特定标签数,特定的标签相当于表示冒烟用例,通过用例,不通过用例,解决人工统计的困难,通过程序统计一个比较准确的数值,允许有一定的偏差,偏差来自于xmind的版本,格式,编写规范等

过程

为chatGTP建立角色

先给chatGTP建立一个角色:测试开发、python开发

给chatGTP提出简单的需求

我:用python,分别读取xmind文件,每个一个画布
AI:要读取xmind文件,需要使用外部库xmind。首先,你需要使用pip在Python环境中安装xmind库。打开终端或命令行,输入以下命令进行安装:

pip install xmind

解析xmind文件

AI:安装完成后,就可以使用xmind库来读取并操作xmind文件了。

以下是一个读取xmind文件,并将每个画布输出为图片的代码示例:

import xmind
import os

# 读取xmind文件
workbook = xmind.load('/path/to/your/xmind/file.xmind')

# 获取每个画布并输出为图片
for sheet in workbook.getSheets():
    # 获取画布名称
    sheet_name = sheet.getTitle()

    # 创建输出目录
    output_dir = f'{os.getcwd()}/{sheet_name}'
    os.makedirs(output_dir, exist_ok=True)

    # 输出画布中的每个主题为图片
    for topic in sheet.getRootTopic().getSubTopics():
        # 获取主题文本
        topic_title = topic.getTitle()

        # 创建输出文件路径
        output_file = f'{output_dir}/{topic_title}.png'

        # 输出主题为图片
        topic.getImage(output_file)

AI对代码的解析

AI:代码中,xmind.load()方法读取指定路径的xmind文件,并返回一个workbook对象。getSheets()方法获取xmind文件中的所有画布。遍历每个画布,获取画布名称并创建输出目录。

然后,遍历每个画布中的主题,获取主题文字并创建输出文件的路径。getImage()方法将主题输出为png格式的图片。

这个示例代码可以帮助你开始读取和处理xmind文件。你可以根据自己的需求,进一步扩展和优化代码。


AI明细是要输出图片,这也明细不是我的本意,我意思是输出每个sheet的名字

矫正AI的理解重写需求

我:只需要在python里面print一下所有的画布名称

AI:

import xmind

# 读取xmind文件
workbook = xmind.load('/path/to/your/xmind/file.xmind')

# 遍历每个画布并打印画布名称
for sheet in workbook.getSheets():
    print(sheet.getTitle())

代码中,workbook.getSheets()方法获取xmind文件中的所有画布,
然后使用for循环遍历每个画布,打印出画布的名称。
运行代码,即可在控制台上看到所有画布的名称。

我:xmind这个库无法打开最新的xmind

AI:如果xmind库无法打开最新格式的xmind文件,可能需要使用最新的xmind库或者其他支持最新xmind格式的库。

可以尝试使用xmind-sdk-python库来打开最新版本的xmind文件,它是Xmind的官方开发工具,支持最新版本的xmind文件。

以下是一个使用xmind-sdk-python库打开xmind文件,并打印所有画布名称的示例代码:

from xmind import xmind_to_dict

# 读取xmind文件
xmind_file = '/path/to/your/xmind/file.xmind'

# 将xmind文件转换成字典
xmind_dict = xmind_to_dict(xmind_file)

# 获取画布列表
sheets = xmind_dict.get('sheets')

# 打印所有画布名称
if sheets:
    for sheet in sheets:
        print(sheet.get('title'))


代码中,xmind_to_dict()方法将xmind文件读入,并将其转换成一个包含所有信息的字典。
然后通过获取字典中的'sheets'键,获取所有画布的信息。
对于每个画布,使用get()方法获取名称信息并打印。

这个示例代码可以帮助你使用xmind-sdk-python库,打开最新版本的xmind文件并打印出画布名称。
你可以根据自己的需求,进一步扩展和优化代码。

指定AI使用指定类库

我:用这个库:xmindparser

AI:xmindparser是第三方库,可以解析最新版本Xmind文件,进行导入和导出,同时提供方便的API,方便对Xmind文件进行修改和处理。以下是一个使用xmindparser库读取xmind文件,并打印所有画布名称的代码示例:

from xmindparser import xmind_to_dict

# 读取xmind文件
xmind_file = '/path/to/your/xmind/file.xmind'

# 将xmind文件转换成字典
xmind_dict = xmind_to_dict(xmind_file)

# 获取画布列表
sheets = xmind_dict.get('topic-refs')

# 打印所有画布名称
if sheets:
    for sheet in sheets:
        sheet_id = sheet.get('id')
        sheet_title = xmind_dict.get(sheet_id, {}).get('title')
        print(sheet_title)

代码中,xmind_to_dict()方法读取xmind文件,并将其转换成一个字典。
使用xmind_dict.get()方法,获取字典中的'topic-refs'键,它包含了所有画布的引用。
对于每个画布引用,获取它的id并使用xmind_dict.get()方法获取对应的画布信息,
包括标题信息,并打印出标题信息。

这个示例代码可以帮助你使用xmindparser库,打开最新版本的xmind文件并打印出画布名称。
你可以根据自己的需求,进一步扩展和优化代码。

到这里把代码贴上去,还是有报错的,再一次调教一下AI,再完善一下需求的方向

我:用python的xmindparser库,分别读取xmind文件中每个画布的名称

AI:使用xmindparser库,可以通过以下代码读取xmind文件中每个画布的所有主题及其名称信息:

from xmindparser import xmind_to_dict

# 读取xmind文件
xmind_file = '/path/to/your/xmind/file.xmind'

# 将xmind文件转换成字典
xmind_dict = xmind_to_dict(xmind_file)

# 获取画布列表
sheets = xmind_dict.get('topic-refs')

# 遍历所有画布的主题并打印主题名称
if sheets:
    for sheet in sheets:
        sheet_id = sheet.get('id')
        sheet_title = xmind_dict.get(sheet_id, {}).get('title')
        sheet_topics = xmind_dict.get(sheet_id, {}).get('topics')

        if sheet_topics:
            for topic in sheet_topics:
                topic_title = topic.get('title')
                print(f'画布: {sheet_title}, 主题: {topic_title}')

代码中,xmind_to_dict()方法读取xmind文件,并将其转换成一个字典。
使用xmind_dict.get()方法,获取字典中的'topic-refs'键,它包含了所有画布的引用。
对于每个画布引用,获取它的id,并使用xmind_dict.get()方法获取对应的画布信息,包括标题信息和主题信息。

对于每个画布,遍历主题信息,获取主题标题信息并打印。

这个示例代码可以帮助你使用xmindparser库读取xmind文件中所有画布的主题及其名称信息。
你可以根据自己的需求,进一步扩展和优化代码。

'list' object has no attribute 'get'

运行之后,发送报错了,把错误在抛给gtp,sheets = xmind_dict.get('topic-refs')
AttributeError: 'list' object has no attribute 'get'

AI:如果你遇到'list' object has no attribute 'get'错误,可能是由于读取xmind文件后返回了列表而非字典对象。

这种情况下,你可以尝试使用以下代码,从列表中获取字典对象:

from xmindparser import xmind_to_dict

# 读取xmind文件
xmind_file = '/path/to/your/xmind/file.xmind'

# 将xmind文件转换成字典或列表
xmind_data = xmind_to_dict(xmind_file)

# 如果返回的是列表,则获取第一个元素
if isinstance(xmind_data, list):
    xmind_data = xmind_data[0]

# 获取画布列表
sheets = xmind_data.get('topic-refs')

# 遍历所有画布的主题并打印主题名称
if sheets:
    for sheet in sheets:
        sheet_id = sheet.get('id')
        sheet_title = xmind_data.get(sheet_id, {}).get('title')
        sheet_topics = xmind_data.get(sheet_id, {}).get('topics')

        if sheet_topics:
            for topic in sheet_topics:
                topic_title = topic.get('title')
                print(f'画布: {sheet_title}, 主题: {topic_title}')

代码中,使用isinstance()方法判断返回值的类型,如果是列表类型,则获取第一个元素。
获取画布列表后,遍历所有画布的主题并打印主题名称。

使用这个代码可以解决'list' object has no attribute 'get'错误,帮助你使用xmindparser库读取xmind文件中所有画布的主题及其名称信息。

 运行了一下代码,结果打印为空

继续给AI抛出错误:打印的结果为什么会为空?

下面是AI给出的意见,大概是个说,xmind的文件没有对应字段

可以先通过xmind的类库打开文件,读取并打印信息,看看文件的字段名叫什么

from xmind import xmind_to_dict

# 读取xmind文件
xmind_file = '/path/to/your/xmind/file.xmind'

# 将xmind文件转换成字典
xmind_dict = xmind_to_dict(xmind_file)

 我:我的内容不包含topic-refs,替换成‘title’,而且个列表

AI:如果你的xmind文件中没有topic-refs键,但是有title键,可以按照以下代码读取画布名称和主题名称。

from xmindparser import xmind_to_dict

# 读取xmind文件
xmind_file = '/path/to/your/xmind/file.xmind'

# 将xmind文件转换成字典或列表
xmind_data = xmind_to_dict(xmind_file)

# 如果返回的是列表,则获取第一个元素
if isinstance(xmind_data, list):
    xmind_data = xmind_data[0]

# 获取画布列表
sheets = xmind_data.get('title')

# 处理每个画布
for sheet in sheets:
    sheet_title = sheet['title']

    # 处理画布中的主题
    root_topic = sheet.get('topics', {})
    topics = root_topic.get('children', [])

    # 处理每个主题
    for topic in topics:
        topic_title = topic.get('title', '')
        print(f'画布: {sheet_title}, 主题: {topic_title}')

代码中,我们先使用xmindparser库将xmind文件转换成字典或列表格式。
如果返回的是一个列表,则需要获取列表中的第一个元素。

然后,获取画布列表。在这种情况下,'title'键返回的值是一个列表,我们需要处理每个画布。

对于每个画布,获取其标题,并处理其中的主题。在这个例子中,我们使用根主题作为画布的主题,
然后获取主题下的所有子主题。对于每个主题,获取其标题,打印输出画布名称和主题名称。

这个代码可以帮助你使用xmindparser库读取xmind文件中所有画布和主题名称信息,
并对其进行处理和扩展。

string indices must be integers

我:sheet_title = sheet['title']
TypeError: string indices must be integers

AI:如果你遇到TypeError: string indices must be integers错误,可能是由于代码中对字符串类型的变量进行了索引,而字符串类型是不支持索引操作的。

针对这种情况,你可以使用以下代码:

from xmindparser import xmind_to_dict

# 读取xmind文件
xmind_file = '/path/to/your/xmind/file.xmind'

# 将xmind文件转换成字典或列表
xmind_data = xmind_to_dict(xmind_file)

# 如果返回的是列表,则获取第一个元素
if isinstance(xmind_data, list):
    xmind_data = xmind_data[0]

# 获取画布列表
sheets = xmind_data.get('title')

# 处理每个画布
for sheet in sheets:
    if isinstance(sheet, str):
        sheet_title = sheet
    else:
        sheet_title = sheet.get('title', '')

    # 处理画布中的主题
    root_topic = sheet.get('topics', {})
    topics = root_topic.get('children', [])

    # 处理每个主题
    for topic in topics:
        topic_title = topic.get('title', '')
        print(f'画布: {sheet_title}, 主题: {topic_title}')

在这个代码中,我们增加了一个判断:如果当前画布的类型是字符串,
直接将其作为画布标题;否则,使用get()方法获取其标题,如果无法获取,则将其设为空字符串。

这个代码可以解决TypeError: string indices must be integers错误,
帮助你使用xmindparser库读取xmind文件中所有画布和主题名称信息,并对其进行处理和扩展。

AttributeError: 'str' object has no attribute

我:root_topic = sheet.get('topics', {}) AttributeError: 'str' object has no attribute 'get'

AI:

如果你遇到了AttributeError: 'str' object has no attribute 'get'错误,在这种情况下是因为原先的代码设定先判断json中的'title'键是否存在,若存在后继续操作,但'title'返回的是字符串,字符串类型是不支持使用get方法的。

因此,需要先判断获取到的变量是否为字典类型,如果是则使用get()方法获取'topics'键对应的值,否则设置root_topic为一个空字典。

修改后的代码如下:

from xmindparser import xmind_to_dict

# 读取xmind文件
xmind_file = '/path/to/your/xmind/file.xmind'

# 将xmind文件转换成字典或列表
xmind_data = xmind_to_dict(xmind_file)

# 如果返回的是列表,则获取第一个元素
if isinstance(xmind_data, list):
    xmind_data = xmind_data[0]

# 获取画布列表
sheets = xmind_data.get('title')

# 处理每个画布
for sheet in sheets:
    if isinstance(sheet, str):
        sheet_title = sheet
    else:
        sheet_title = sheet.get('title', '')

    # 处理画布中的主题
    if isinstance(sheet, dict):
        root_topic = sheet.get('topics', {})
        topics = root_topic.get('children', [])
    else:
        topics = []

    # 处理每个主题
    for topic in topics:
        topic_title = topic.get('title', '')
        print(f'画布: {sheet_title}, 主题: {topic_title}')

在这个代码中,我们增加了一个判断:如果当前画布的类型是字典,
使用get()方法获取'topics'键对应的值,否则将topics设置为空列表。

这个代码可以解决AttributeError: 'str' object has no attribute 'get'错误,
帮助你使用xmindparser库读取xmind文件中所有画布和主题名称信息,并对其进行处理和扩展。

来到这里,代码没有报错,运行也没有打印结果,由于上面我们看过数据格式,在一次告诉AI我们的结果格式

向AI提出我需要的结果

我:我告诉你一下,这是xmind_data结果:[{'title': '画布 1', 'topic': {'title': '中心主题', 'topics': [{'title': '分支主题 1', 'makers': ['tag-red']}, {'title': '分支主题 2', 'makers': ['tag-orange']}, {'title': '分支主题 3', 'makers': ['tag-green'], 'topics': [{'title': '子主题 1', 'makers': ['priority-1']}, {'title': '子主题 2', 'makers': ['flag-red']}]}, {'title': '分支主题 4'}]}, 'structure': 'org.xmind.ui.map.unbalanced'}, {'title': '画布 2', 'topic': {'title': '中心主题', 'topics': [{'title': '分支主题 1'}, {'title': '分支主题 2'}]}, 'structure': 'org.xmind.ui.map.unbalanced'}]

AI:好的,根据你提供的内容,可以按照以下代码处理xmind_data:

from xmindparser import xmind_to_dict

# 读取xmind文件
xmind_file = '/path/to/your/xmind/file.xmind'

# 将xmind文件转换成字典或列表
xmind_data = xmind_to_dict(xmind_file)

# 处理每个画布
for sheet in xmind_data:
    sheet_title = sheet.get('title', '')

    # 处理画布中的主题
    root_topic = sheet.get('topic', {})
    topics = root_topic.get('topics', [])

    # 处理每个主题
    for topic in topics:
        topic_title = topic.get('title', '')
        print(f'画布: {sheet_title}, 主题: {topic_title}')

来到这里由于有运行结果,当然结果还是需要进一步优化的,需要优化画布的名称重复输出

我:只需要打印,画布名称就可以了

AI: 如果你只需要打印画布名称,可以按照以下代码处理xmind_data:

from xmindparser import xmind_to_dict

# 读取xmind文件
xmind_file = '/path/to/your/xmind/file.xmind'

# 将xmind文件转换成字典或列表
xmind_data = xmind_to_dict(xmind_file)

# 打印每个画布的名称
for sheet in xmind_data:
    sheet_title = sheet.get('title', '')
    print(f'画布: {sheet_title}')


这个代码会遍历xmind_data中所有的画布,获取画布的名称并打印出来。

如果你需要获取更多的信息,比如主题的数量或者关系,可以对代码进行相应的修改,
比如添加一个计数器获取主题数量等。

这里只统计了一个结果,需要遍历所有结果出来

我:继续完善这个代码,for循环遍历xmind_data,得到每个一个画布,循环遍历找到每个画布里面的makers键的值,且统计值的个数

AI:继续完善这个代码,for循环遍历xmind_data,得到每个一个画布,循环遍历找到每个画布里面的makers键的值,且统计值的个数

from collections import Counter
from xmindparser import xmind_to_dict

# 读取xmind文件
xmind_file = '/path/to/your/xmind/file.xmind'

# 将xmind文件转换成字典或列表
xmind_data = xmind_to_dict(xmind_file)

# 遍历每个画布
for sheet in xmind_data:
    sheet_title = sheet.get('title')

    markers = []
    # 遍历每个主题,获取标签列表
    for topic in sheet.get('topic', {}).get('topics', []):
        markers += topic.get('markers', [])

    # 统计每个标签出现的次数
    marker_count = Counter(markers)

    # 输出结果
    print(f'画布: {sheet_title}')
    for marker, count in marker_count.items():
        print(f'标签:{marker},出现次数:{count}')
    print('\n')

我:完善代码makers的值分别为:tag-green,tag-red,tag-yellow

AI:好的,如果你需要在上面的代码基础上进一步筛选标签,使其仅包含值为’tag-green’、'tag-red’和’tag-yellow’的标签,并统计其出现次数,可以按照以下代码进行修改:

from collections import Counter
from xmindparser import xmind_to_dict

# 读取xmind文件
xmind_file = '/path/to/your/xmind/file.xmind'

# 将xmind文件转换成字典或列表
xmind_data = xmind_to_dict(xmind_file)

# 遍历每个画布
for sheet in xmind_data:
    sheet_title = sheet.get('title')

    markers = []
    # 遍历每个主题,获取标签列表
    for topic in sheet.get('topic', {}).get('topics', []):
        for marker in topic.get('markers', []):
            if marker in ['tag-green', 'tag-red', 'tag-yellow']:
                markers.append(marker)

    # 统计每个标签出现的次数
    marker_count = Counter(markers)

    # 输出结果
    print(f'画布: {sheet_title}')
    for marker, count in marker_count.items():
        print(f'标签:{marker},出现次数:{count}')
    print('\n')

我:我告诉你一下,这是xmind_data结果,有‘画布1’和‘画布2’,分别统计出'tag-green', 'tag-red', 'tag-yellow'的标签数量:[{'title': '画布 1', 'topic': {'title': '中心主题', 'topics': [{'title': '分支主题 1', 'makers': ['tag-red']}, {'title': '分支主题 2', 'makers': ['tag-orange']}, {'title': '分支主题 3', 'makers': ['tag-green'], 'topics': [{'title': '子主题 1', 'makers': ['priority-1']}, {'title': '子主题 2', 'makers': ['flag-red']}]}, {'title': '分支主题 4'}]}, 'structure': 'org.xmind.ui.map.unbalanced'}, {'title': '画布 2', 'topic': {'title': '中心主题', 'topics': [{'title': '分支主题 1'}, {'title': '分支主题 2'}]}, 'structure': 'org.xmind.ui.map.unbalanced'}] 

AI:好的,那么可以按照如下代码对xmind_data进行进一步筛选和统计:

from collections import Counter
from xmindparser import xmind_to_dict

# 读取xmind文件
xmind_file = '/path/to/your/xmind/file.xmind'

# 将xmind文件转换成字典或列表
xmind_data = xmind_to_dict(xmind_file)

# 定义要统计的标签
target_tags = ['tag-green', 'tag-red', 'tag-yellow']

# 遍历每个画布
for sheet in xmind_data:
    sheet_title = sheet.get('title')

    markers = []
    # 遍历每个主题,获取标签列表
    for topic in sheet.get('topic', {}).get('topics', []):
        makers = topic.get('makers', [])
        # 筛选出目标标签
        target_makers = [maker for maker in makers if maker in target_tags]
        markers.extend(target_makers)

    # 统计每个标签出现的次数
    marker_count = Counter(markers)

    # 输出结果
    print(f'画布: {sheet_title}')
    for target_tag in target_tags:
        count = marker_count[target_tag]
        print(f'标签:{target_tag},出现次数:{count}')
    print('\n')

我:然后将这几个标签的数相加'tag-green', 'tag-red', 'tag-yellow'

AI:

from collections import Counter
from xmindparser import xmind_to_dict

# 读取xmind文件
xmind_file = '/path/to/your/xmind/file.xmind'

# 将xmind文件转换成字典或列表
xmind_data = xmind_to_dict(xmind_file)

# 定义要统计的标签
target_tags = ['tag-green', 'tag-red', 'tag-yellow']

# 初始化标签数量
total_count = 0

# 遍历每个画布
for sheet in xmind_data:
    markers = []
    # 遍历每个主题,获取标签列表
    for topic in sheet.get('topic', {}).get('topics', []):
        makers = topic.get('makers', [])
        # 筛选出目标标签
        target_makers = [maker for maker in makers if maker in target_tags]
        markers.extend(target_makers)

    # 统计每个标签出现的次数
    marker_count = Counter(markers)

    # 累加每个目标标签的出现次数
    for target_tag in target_tags:
        count = marker_count[target_tag]
        total_count += count
        print(f'标签:{target_tag},出现次数:{count}')

    print(f"目标标签共出现了{total_count}次\n")

 最后面,就不断和AI沟通,完善代码

from xmindparser import xmind_to_dict

xmind_file = 'test.xmind'

xmind_dict = xmind_to_dict(xmind_file)


def count_titles_and_tags(topics):
    """
    递归地统计所有的title和tag数量
    """
    title_count = len(topics)  # 统计当前主题块的数量
    tag_red_count = 0
    tag_orange_count = 0
    tag_green_count = 0

    for topic in topics:
        if 'makers' in topic and 'tag-red' in topic['makers']:
            tag_red_count += 1
        if 'makers' in topic and 'tag-yellow' in topic['makers']:
            tag_orange_count += 1
        if 'makers' in topic and 'tag-green' in topic['makers']:
            tag_green_count += 1

        if 'topics' in topic:
            sub_topics = topic['topics']
            sub_counts = count_titles_and_tags(sub_topics)
            title_count += sub_counts[0]
            tag_red_count += sub_counts[1]
            tag_orange_count += sub_counts[2]
            tag_green_count += sub_counts[3]

    return title_count, tag_red_count, tag_orange_count, tag_green_count


# 统计所有的title和tag数量
# total_counts = count_titles_and_tags(xmind_dict[0]['topic']['topics'])
# print("Total number of titles:", total_counts[0])
# print("Total number of tag-red:", total_counts[1])
# print("Total number of tag-orange:", total_counts[2])
# print("Total number of tag-green:", total_counts[3])


# for canvas in xmind_dict:
#     print("Canvas name:", canvas['title'])
#     topics = canvas['topic']['topics']
#     total_counts = count_titles_and_tags(topics)
#     print("Total number of titles in canvas:", total_counts[0])
#     print("Total number of tag-red in canvas:", total_counts[1])
#     print("Total number of tag-orange in canvas:", total_counts[2])
#     print("Total number of tag-green in canvas:", total_counts[3])


# 初始化总计数器
total_counts = [0, 0, 0, 0]  # title计数器,tag-red计数器,tag-orange计数器,tag-green计数器

for canvas in xmind_dict:
    print("Canvas name:", canvas['title'])
    topics = canvas['topic']['topics']
    canvas_counts = count_titles_and_tags(topics)
    print("Total number of titles in canvas:", canvas_counts[0])
    print("Total number of tag-red in canvas:", canvas_counts[1])
    print("Total number of tag-orange in canvas:", canvas_counts[2])
    print("Total number of tag-green in canvas:", canvas_counts[3])

    # 累加计数器
    total_counts[0] += canvas_counts[0]  # title计数器累加
    total_counts[1] += canvas_counts[1]  # tag-red计数器累加
    total_counts[2] += canvas_counts[2]  # tag-orange计数器累加
    total_counts[3] += canvas_counts[3]  # tag-green计数器累加

# 输出总计数器结果
print("Canvas name:总计数")
print("Total number of titles:", total_counts[0])
print("Total number of tag-red:", total_counts[1])
print("Total number of tag-orange:", total_counts[2])
print("Total number of tag-green:", total_counts[3])

运行结果

  • 2
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值