21 lines
730 B
Plaintext
21 lines
730 B
Plaintext
async def get_wechat_appid(ns={}):
|
|
db = DBPools()
|
|
async with db.sqlorContext('kboss') as sor:
|
|
wechat_info = await sor.R('params', {'pname': 'wechat_appid_secret'})
|
|
if wechat_info:
|
|
wechat_info_dic = json.loads(wechat_info[0]) if isinstance(wechat_info[0], str) else wechat_info[0]
|
|
pvalue = json.loads(wechat_info_dic['pvalue'])
|
|
appid = pvalue['appid']
|
|
return {
|
|
'status': True,
|
|
'msg': 'get appid success',
|
|
'appid': appid
|
|
}
|
|
else:
|
|
return {
|
|
'status': False,
|
|
'msg': 'can not find appid'
|
|
}
|
|
|
|
ret = await get_wechat_appid(params_kw)
|
|
return ret |