代码拉取完成,页面将自动刷新
# -*- coding: UTF-8 -*-
import json
def theme():
conf_z = open("theme.json",'r',encoding = "utf-8")
conf_s = conf_z.read()
conf_z.close()
conf_j = str(conf_s)
thing = "theme"#取xx项
conf_jg = json.loads(conf_j)
conf_jg = conf_jg[thing]
return conf_jg
def config_one(theme,xiang):
theme_c = theme
xiang_c = xiang
conf_z = open(theme_c+"/config.json",'r',encoding = "utf-8")
conf_s = conf_z.read()
conf_z.close()
conf_j = str(conf_s)
conf_jg = json.loads(conf_j)
conf_jg = conf_jg[xiang_c]
return conf_jg
def config_two(theme,xiang_one,xiang_two):
theme_c = theme
xiang_one_c = xiang_one
xiang_two_c = xiang_two
conf_z = open(theme_c+"/config.json",'r',encoding = "utf-8")
conf_s = conf_z.read()
conf_z.close()
conf_j = str(conf_s)
conf_jg = json.loads(conf_j)
conf_jg = conf_jg[xiang_one_c][xiang_two_c]
return conf_jg
def config_three(theme,xiang_one,xiang_two,xiang_three):
theme_c = theme
xiang_one_c = xiang_one
xiang_two_c = xiang_two
xiang_three_c = xiang_three
conf_z = open(theme_c+"/config.json",'r',encoding = "utf-8")
conf_s = conf_z.read()
conf_z.close()
conf_j = str(conf_s)
conf_jg = json.loads(conf_j)
conf_jg = conf_jg[xiang_one_c][xiang_two_c][xiang_three_c]
return conf_jg
def config_four(theme,xiang_one,xiang_two,xiang_three,xiang_four):
theme_c = theme
xiang_one_c = xiang_one
xiang_two_c = xiang_two
xiang_three_c = xiang_three
xiang_four_c = xiang_four
conf_z = open(theme_c+"/config.json",'r',encoding = "utf-8")
conf_s = conf_z.read()
conf_z.close()
conf_j = str(conf_s)
conf_jg = json.loads(conf_j)
conf_jg = conf_jg[xiang_one_c][xiang_two_c][xiang_three_c][xiang_four_c]
return conf_jg
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。