建議表字段
suggest_id int(11) 自動增量 建議id
user_id int(11) 用戶id
type tinyint(2) 1咨詢加以2我的建議
content varchar(256) NULL 建議內容
images tinytext NULL 圖片地址
phone varchar(25) NULL 手機號
options varchar(50) NULL 建議選項
status tinyint(2) [0] 0未處理1已處理
create_time datetime 創建時間
update_time datetime NULL 更改時間
問卷調查表字段
question_id int(11) 自動增量 問題id
question varchar(150) 問題
options json NULL 答案選項
(數組)
type tinyint(3) 1單選2多選3文字回答
is_require tinyint(2) [0] 0非必填1必填
create_time datetime 創建時間
update_time datetime NULL 更新時間
問卷答案表字段
answer_id int(11) 自動增量
question_id int(11) 問題id
user_id int(11) NULL 用戶id
answer json NULL 答案
(數組)
create_time datetime 創建時間
update_time datetime NULL 更新時間
1.建議表單提交
~~~[api]
post:https://wenlv.henan100.com/api.php/suggest/suggest_add
*init:user_id=默認值#用戶id(必填項)
*init:type=默認值#1咨詢建議2我的建議(必填項)
*string:content=默認值#建議內容(必填項)
*string:openid=默認值#openid(必填項)
*string:scene_id=默認值#表單id(必填項)
*string:nickname=默認值#昵稱(必填項)
*string:images=默認值#圖片地址,拼接成字符串后在提交(選填)
*string:phone=默認值#手機號(選填)
*string:options=默認值#問題選項(選填)
<<<
success
<<<
error
~~~
2.建議列表
~~~[api]
get:https://wenlv.henan100.com/api.php/suggest/suggest_list
*string:user_id=默認值#用戶id
type#1咨詢建議2我的建議
page#頁碼
<<<
success
{
"code":?1,
"msg":?"ok",
"data":?[]
}
<<<
error
~~~
3.問卷調查表
~~~[api]
get:https://wenlv.henan100.com/api.php/suggest/question_list
<<<
success
{
"code":?1,
"msg":?"ok",
"data":?\[
????????{
"question\_id":?1,
"question":?"您來自?省?市?縣",
"options":?null,
"type":?3,
"is\_require":?0,
"create\_time":?"2021-03-22?17:39:34",
"update\_time":?null
????????},
????????{
"question\_id":?2,
"question":?"您的年齡為?",
"options":?{
"A":?"25歲以下",
"B":?"25-40歲",
"C":?"40-55歲",
"D":?"55歲以上"
????????????},
"type":?1,
"is\_require":?0,
"create\_time":?"2021-03-23?09:15:18",
"update\_time":?null
????????},
????????{
"question\_id":?3,
"question":?"您是通過何種途徑了解河南景區的?",
"options":?{
"A":?"微博",
"B":?"微信",
"C":?"其他網絡渠道",
"D":?"電視",
"E":?"報紙",
"F":?"旅行社推薦",
"G":?"親朋介紹",
"H":?"其他"
????????????},
"type":?2,
"is\_require":?0,
"create\_time":?"2021-03-23?10:41:16",
"update\_time":?null
????????},
<<<
error
~~~
4.問卷提交
表單提交示例:
{
'user_id':1,
answer:{//1,2,3是question_id,以question_id作為鍵名
1:'A',//單選
2:[A,B,C],//多選
3:'smnsdnsd'//字符串,用戶輸入
}
}
~~~[api]
post:https://wenlv.henan100.com/api.php/suggest/question_add
*int:user_id=默認值#用戶id
*array:answer=默認值#字典
<<<
success
<<<
error
~~~