社区文档构建进行中,欢迎编辑。社区答疑群(非官方):717421103,点点小课堂(腾讯会议):5696651544

全站通知:

模块:Test

来自WIKI实验室WIKI_BWIKI_哔哩哔哩
跳到导航 跳到搜索

1t 这是个示例的文档,位于模块:Test/doc。


local p = {}
local games = {
	[1] = {
		['克洛德'] = {
			['ID'] = '克洛德',
			['KeyName'] = '克洛德',
			['LV'] = 1,
			['HP'] = 130,
		},
		['蕾娜'] = {
			['ID'] = '蕾娜',
			['KeyName'] = '蕾娜',
			['LV'] = 1,
			['HP'] = 100,
		}
	},
	[2] = {
		data = {
   			["米雪儿·李"] = {
				ID = 10101,
				profession = 2, 
				camp = 1, 
				NameEn = "Michele", 
				Sex = "女", 
				Desc = "欧泊小队新锐搜查官,努力守望着美好的理想乡。", 
				Apartment = "埃利蒙德东2区", 
				Title = "萌新搜查官",  
				Height = "158CM", 
				Weight = "48KG", 
				Birthday = "3/25", 
				Constellation = "水瓶座", 
				Age = "16", 
				blood = "A型", 
				CvCn = "张雨曦", 
				Cv = "关根明良",
			}
		}
	}
}
function p.id(frame)
    return games[1][frame.args.x][frame.args.y]
end

function p.load_json(frame)
    local j = mw.title.new(frame.args.page_title):getContent()
    return mw.text.jsonDecode(j)["AAA"]["BBB"]
end

function p.seo()
	local data = games[2].data
	local map_profession = { "决斗", "守护", "支援", "先锋", "控场" }
	local map_camp = { "欧泊", "剪刀手", "乌尔比诺" }
    local pagename = '米雪儿·李' -- mw.title.getCurrentTitle().text
    local subpagename = '米雪儿·李' -- mw.title.getCurrentTitle().subpageText
    return mw.ext.seo.set{
        title = subpagename .. ' - 卡拉彼丘WIKI(沙盒)',
        type = 'article',
        locale = 'zh-CN',
        image = pagename .. '头像.png',
        image_alt = pagename .. '的头像',
        keywords = pagename .. ',' .. data[pagename]['NameEn'] .. ',' .. data[pagename]['Title'] .. ',' .. map_profession[data[pagename]['profession']] .. ',' .. map_camp[data[pagename]['camp']],
        description = data[pagename]['Desc']
    }
end
return p