简要描述:

获取基础设置视图以及设置基础设置数据

请求域名:

  • http://xx.com

请求URL:

GET/plugin.skin-check.admin.set.set(获取视图)
POST/plugin.skin-check.admin.set.set

修改基础设置时传递的参数:

参数名 是否必须 类型 说明
is_open int 插件开启状态,0关1开
basic_data[name] string 自定义名称
basic_data[rank_list] int 排行榜开启状态,0关1开
basic_data[seal] string 印章图片的地址(传相对地址)
basic_data[check_total] int 测试限制总数
basic_data[check_cycle] int 测试限制周期(天)
basic_data[check_cycle_num] int 测试限制1周期可测试x次数
basic_data[target_id] array 选中要显示的程度指标id
basic_data[target_explain] int 指标说明开关,0关1开
basic_data[show_article] int 护肤攻略开关,0关1开
basic_data[article_degree] array 护肤攻略选中的程度id(1:轻度,2:中度,3:重度)
basic_data[article_appoint] int 显示指定攻略,0否1是
basic_data[article] array 指定文章时选中的文章id
basic_data[show_adviser] int 护肤顾问开关,0关1开
basic_data[adviser_degree] array 护肤顾问选中的程度id(1:轻度,2:中度,3:重度)
basic_data[adviser_appoint] int 显示指定顾问,0否1是
basic_data[adviser] array 指定顾问时选中的顾问id
basic_data[show_goods] int 推荐商品开关,0关1开
basic_data[show_goods_label] int 推荐商品标签导航开关,0关1开
basic_data[goods_limit] int 单个指标商品显示数量限制
api_data[appid] string API设置的appid
api_data[appsecret] string API设置的appsecret
api_data[url] string API设置的url
poster_data[check_background] int 背景图选择,0默认1自定义
poster_data[background] string 背景图地址(自定义背景时不能为空)
poster_data[style_data] array 海报的格式数据(下面备注中说明)
treaty_data[is_open] int 协议开关,0关1开
treaty_data[name] string 协议名称
treaty_data[content] string 协议内容

视图数据返回参数说明set:

参数名 类型 说明
articleEnabled int 文章插件开启状态,0关1开,(未开启时顾问数据不给设置)
以下为set参数下的数据
is_open int 插件开启状态,0关1开
basic_data[name] string 自定义名称
basic_data[rank_list] int 排行榜开启状态,0关1开
basic_data[seal] string 印章图片的地址(传相对地址)
basic_data[check_total] int 测试限制总数
basic_data[check_cycle] int 测试限制周期(天)
basic_data[check_cycle_num] int 测试限制1周期可测试x次数
basic_data[target_id] array 选中要显示的程度指标id
basic_data[target_explain] int 指标说明开关,0关1开
basic_data[show_article] int 护肤攻略开关,0关1开
basic_data[article_degree] array 护肤攻略选中的程度id(1:轻度,2:中度,3:重度)
basic_data[article_appoint] int 显示指定攻略,0否1是
basic_data[article] array 指定文章时选中的文章id
basic_data[show_adviser] int 护肤顾问开关,0关1开
basic_data[adviser_degree] array 护肤顾问选中的程度id(1:轻度,2:中度,3:重度)
basic_data[adviser_appoint] int 显示指定顾问,0否1是
basic_data[adviser] array 指定顾问时选中的顾问id
basic_data[show_goods] int 推荐商品开关,0关1开
basic_data[show_goods_label] int 推荐商品标签导航开关,0关1开
basic_data[goods_limit] int 单个指标商品显示数量限制
api_data[appid] string API设置的appid
api_data[appsecret] string API设置的appsecret
api_data[url] string API设置的url
poster_data[check_background] int 背景图选择,0默认1自定义
poster_data[background] string 背景图地址(自定义背景时不能为空)
poster_data[style_data] array 海报的格式数据(下面备注中说明)
treaty_data[is_open] int 协议开关,0关1开
treaty_data[name] string 协议名称
treaty_data[content] string 协议内容
参数名 类型 说明
以下为target参数下的数据(程度指标信息)
id int 指标id
target_name string 指标名称
key string 指标key
target_value array 指标值(键值为指标值的id)
target_name string 指标名称
参数名 类型 说明
以下为adviser参数下的数据(指定的顾问数据信息)
uid int 会员id
mobile string 手机号
nickname string 昵称
avatar string 头像
参数名 类型 说明
以下为article参数下的数据(指定的文章数据信息)
id int 文章id
title string 文章标题
desc string 文章描述

返回示例:

正确时返回的视图数据:(随着视图一并返回,需要进行json_encode)

{
		"set": {
			"id": 1,
			"uniacid": 1,
			"is_open": 1,
			"basic_data": {
				"name": "肌肤测试12",
				"rank_list": "1",
				"seal": "",
				"check_total": "1",
				"check_cycle": "1",
				"check_cycle_num": "1",
				"target_id": "",
				"target_explain": "1",
				"show_article": "1",
				"article_degree": "",
				"article_appoint": "0",
				"article": [
					"5"
				],
				"show_adviser": "1",
				"adviser_degree": "",
				"adviser_appoint": "0",
				"adviser": [
					"164932"
				],
				"show_goods": "1",
				"show_goods_label": "1",
				"goods_limit": "1"
			},
			"api_data": {
				"appid": "600002",
				"appsecret": "28e6fe4206888efe648b0c1657d557be8c55565a1f6491843db99e849353f53f",
				"url": "http://localhost:9527/"
			},
			"poster_data": {
				"check_background": "",
				"background": "",
				"style_data": ""
			},
			"treaty_data": {
				"is_open": "0",
				"name": "",
				"content": ""
			},
			"created_at": "2020-11-02 11:31:00",
			"updated_at": "2020-11-02 11:45:06"
		},
		"articleEnabled": 1,
		"target": [
			{
				"id": 4,
				"target_name": "毛孔粗大",
				"key": "poresCheeks",
				"target_value": {
					"1": "轻度",
					"2": "中度",
					"3": "重度"
				},
				"explain_type": {
					"1": "轻度",
					"2": "中度",
					"3": "重度"
				}
			},
			{
				"id": 5,
				"target_name": "黑头",
				"key": "skinBlackHeadsDesc",
				"target_value": {
					"1": "轻度",
					"2": "中度",
					"3": "重度"
				},
				"explain_type": {
					"1": "轻度",
					"2": "中度",
					"3": "重度"
				}
			},
			{
				"id": 6,
				"target_name": "痘痘",
				"key": "skinPimpleDesc",
				"target_value": {
					"1": "轻度",
					"2": "中度",
					"3": "重度"
				},
				"explain_type": {
					"1": "轻度",
					"2": "中度",
					"3": "重度"
				}
			},
			{
				"id": 7,
				"target_name": "痘印",
				"key": "skinSpotDesc",
				"target_value": {
					"1": "轻度",
					"2": "中度",
					"3": "重度"
				},
				"explain_type": {
					"1": "轻度",
					"2": "中度",
					"3": "重度"
				}
			},
			{
				"id": 8,
				"target_name": "痣",
				"key": "skinMoleDesc",
				"target_value": {
					"1": "轻度",
					"2": "中度",
					"3": "重度"
				},
				"explain_type": {
					"1": "轻度",
					"2": "中度",
					"3": "重度"
				}
			},
			{
				"id": 9,
				"target_name": "色斑",
				"key": "skinAcneDesc",
				"target_value": {
					"1": "轻度",
					"2": "中度",
					"3": "重度"
				},
				"explain_type": {
					"1": "轻度",
					"2": "中度",
					"3": "重度"
				}
			},
			{
				"id": 10,
				"target_name": "黑眼圈",
				"key": "skinPandaEye",
				"target_value": {
					"1": "轻度",
					"2": "中度",
					"3": "重度"
				},
				"explain_type": {
					"1": "轻度",
					"2": "中度",
					"3": "重度"
				}
			},
			{
				"id": 11,
				"target_name": "皱纹",
				"key": "skinWrinkle",
				"target_value": {
					"1": "轻度",
					"2": "中度",
					"3": "重度"
				},
				"explain_type": {
					"1": "轻度",
					"2": "中度",
					"3": "重度"
				}
			}
		],
		"adviser": [
			{
				"uid": 164932,
				"mobile": "1",
				"nickname": "A李李李",
				"avatar": "http://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTIyz11G1bdMA4kgjxzrbd4GCZDUpK16Pib8Iq9qjdm7UOgJgVDtQtjybWhWGCgopiaPUXlKDCQfj7xg/132",
				"avatar_image": "https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTIyz11G1bdMA4kgjxzrbd4GCZDUpK16Pib8Iq9qjdm7UOgJgVDtQtjybWhWGCgopiaPUXlKDCQfj7xg/132",
				"username": "A李李李",
				"yz_member": {
					"member_id": 164932,
					"wechat": "123213"
				}
			}
		],
		"article": [
			{
				"id": 5,
				"title": "测试测试测试",
				"desc": "2323232323",
				"liked": null,
				"virtual_at": "1970-01-01"
			}
		]
	}
{
	"result": 1,
	"msg": "设置成功",
	"data": []
}

错误时返回:

{
	"result": 0,
	"msg": "设置失败",
	"data": []
}

备注:

  • 更多返回错误代码请看首页的错误代码描述