diff --git a/app.json b/app.json
index 7ef40c6..59a01be 100644
--- a/app.json
+++ b/app.json
@@ -69,7 +69,10 @@
"pages/shareFriend/shareFriend",
"components/dateLsit/dateLsit",
"pages/dateLsit/dateLsit",
- "pages/activityCalendar/activityCalendar"
+ "pages/activityCalendar/activityCalendar",
+ "pages/complaint/complaint",
+ "pages/questionnaire/questionnaire",
+ "pages/questionnaire/questionnaireLsit/questionnaireLsit"
],
"subpackages": [
{
diff --git a/components/banner/index.js b/components/banner/index.js
index a6a401b..1c41daf 100644
--- a/components/banner/index.js
+++ b/components/banner/index.js
@@ -37,7 +37,11 @@ Component({
wx.navigateTo({
url: `/${e.currentTarget.dataset.data.pagePath}`,
})
- } else if (type == 'ra'){
+ }else if(type == "wj"){
+ wx.navigateTo({
+ url: `/pages/questionnaire/questionnaire?id=${id}`,
+ })
+ }else if (type == 'ra'){
wx.navigateTo({
url: `/pages/radetail/index?id=${id}`,
})
diff --git a/config/config.js b/config/config.js
index fcfd6e8..34d193c 100755
--- a/config/config.js
+++ b/config/config.js
@@ -20,6 +20,14 @@ var config = {
* 微信消息推送获取模板id
*/
templateId: "/wxMsg/templateList",
+ //问卷列表
+ questionnaire :"/wxQuestionOneself/list",
+ //问卷详情
+ questionnaireDetail:"/wxQuestionOneself/detailsById",
+ //提交问卷
+ submitQuestin:"/wxQuestionOneself/userAdd",
+ //投诉建议add
+ suggest:"/wxOpinion/add",
/**
* 接口用途:login
*/
diff --git a/index/user.json b/index/user.json
index fb5f604..f78492e 100644
--- a/index/user.json
+++ b/index/user.json
@@ -4,6 +4,5 @@
"navbar": "../components/navbar/navbar"
},
"navigationBarBackgroundColor": "#FD832D",
- "navigationBarTextStyle": "white",
- "disableScroll": true
+ "navigationBarTextStyle": "white"
}
\ No newline at end of file
diff --git a/index/user.wxml b/index/user.wxml
index dc49b40..b7d907e 100644
--- a/index/user.wxml
+++ b/index/user.wxml
@@ -123,6 +123,18 @@
>
+
+
+ 问券调查
+ >
+
+
+
+
+ 投诉建议
+ >
+
+
关于我们
diff --git a/pages/complaint/complaint.js b/pages/complaint/complaint.js
new file mode 100644
index 0000000..26c8aa6
--- /dev/null
+++ b/pages/complaint/complaint.js
@@ -0,0 +1,129 @@
+// pages/complaint/complaint.js
+const Http = require("../../utils/HttpBasics");
+var config = require("../../config/config.js");
+var app = getApp();
+const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px'
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ navigationBarHeight,
+ titleVale: "", //标题
+ descrideVal: "", //描述
+ },
+ setDescrideVal(e) { //赋值标题
+ let descrideVal = e.detail.value
+ this.setData({
+ descrideVal: descrideVal
+ })
+ },
+ setTitVal(e) { //赋值描述
+ let titleVale = e.detail.value
+ this.setData({
+ titleVale: titleVale
+ })
+ },
+ save() { //提交
+ if (!this.data.titleVale){
+ wx.showToast({
+ title: '请输入标题',
+ icon: "none",
+ duration: 2000
+ })
+ return
+ }else if(!this.data.descrideVal){
+ wx.showToast({
+ title: '请输入类容',
+ icon:"none",
+ duration:2000
+ })
+ return
+ }
+ let parameter = {
+ title: this.data.titleVale,
+ explains: this.data.descrideVal
+ }
+ Http.post({
+ url: config.api.suggest,
+ data: parameter
+ }).then(item=>{
+ wx.showToast({
+ title: "提交成功!",
+ icon: 'none',
+ duration: 2000,
+ success: () => {
+ setTimeout(() => {
+ wx.switchTab({
+ url: '/index/index'
+ })
+ }, 2000)
+ }
+ });
+ }).catch(err => {
+ wx.showToast({
+ title: err.errMsg,
+ icon: 'none',
+ duration: 2000,
+ // mask: false
+ });
+ })
+
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function(options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function() {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/complaint/complaint.json b/pages/complaint/complaint.json
new file mode 100644
index 0000000..7182c1c
--- /dev/null
+++ b/pages/complaint/complaint.json
@@ -0,0 +1,8 @@
+{
+ "usingComponents": {
+ "navbar": "../../components/navbar/navbar"
+ },
+ "navigationBarTitleText": "",
+ "backgroundColor": "#f4f4f4",
+ "enablePullDownRefresh": true
+}
\ No newline at end of file
diff --git a/pages/complaint/complaint.wxml b/pages/complaint/complaint.wxml
new file mode 100644
index 0000000..f3a2d18
--- /dev/null
+++ b/pages/complaint/complaint.wxml
@@ -0,0 +1,17 @@
+
+
+
+
+ {{"标题:"}}
+
+
+
+
+
+ 详情描述:
+
+
+
+ 提交
+
+
\ No newline at end of file
diff --git a/pages/complaint/complaint.wxss b/pages/complaint/complaint.wxss
new file mode 100644
index 0000000..a01c756
--- /dev/null
+++ b/pages/complaint/complaint.wxss
@@ -0,0 +1,62 @@
+.Box {
+ width: 90%;
+ /* height: 100vh; */
+ margin: auto;
+ overflow: hidden;
+}
+
+.titleBox {
+ overflow: hidden;
+ margin: 20rpx 0;
+}
+
+.title {
+ height: 40rpx;
+ float: left;
+ padding: 20rpx 20rpx 20rpx 0;
+}
+
+.titValueBox {
+ width: 500rpx;
+ float: left;
+ border: 1px solid rgba(0, 0, 0, 0.1);
+ border-radius: 6rpx;
+ padding: 10rpx 10rpx 10rpx 0;
+ margin: 10rpx 10rpx 10rpx 0;
+}
+
+.titValue {
+ margin-left: 20rpx;
+}
+
+.describeBox {
+ padding: 20rpx 20rpx 20rpx 0;
+}
+
+.describeValueBox {
+ width: 80%;
+ margin-left: 108rpx;
+ margin-top: 40rpx;
+ border-radius: 6rpx;
+ border: 1px solid rgba(0, 0, 0, 0.1);
+ height: 600rpx;
+}
+
+.describeValue {
+ width: 92%;
+ height: 90%;
+ margin: 10rpx auto;
+
+}
+
+.submit{
+ width: 600rpx;
+ height: 80rpx;
+ background-color: #FD832D;
+ color: #fff;
+ text-align: center;
+ line-height: 80rpx;
+ border-radius: 50rpx;
+ margin: 100rpx 0rpx 0 50rpx;
+
+}
\ No newline at end of file
diff --git a/pages/getphoneInfo/index.js b/pages/getphoneInfo/index.js
index 7375858..ae73e61 100755
--- a/pages/getphoneInfo/index.js
+++ b/pages/getphoneInfo/index.js
@@ -108,6 +108,13 @@ Page({
return;
}
}
+ // 来着问卷
+ if (that.data.path =="wj"){
+ wx.redirectTo({
+ url: `/pages/questionnaire/questionnaire?id=${that.data.wjId}`
+ })
+ return;
+ }
/**a
* 来自我的
*/
diff --git a/pages/getuserinfo/index.js b/pages/getuserinfo/index.js
index 23eb6f7..2e36dad 100755
--- a/pages/getuserinfo/index.js
+++ b/pages/getuserinfo/index.js
@@ -13,8 +13,10 @@ Page({
couponOrderId: null,
optionData: null,
fromflag: '',
- couponChannelIdflag: ''
+ couponChannelIdflag: '',
+ wjId:"",
},
+ //是否授权手机号
judgePhonelngo() {
Http.get({
url: config.api.checkPhoneStatus,
@@ -45,8 +47,6 @@ Page({
});
})
},
-
-
onLoad: function(options) {
console.log(app.globalData.skip, app.globalData.skipUrl, "跳转地址")
var that = this;
@@ -57,15 +57,18 @@ Page({
fromflag: options.fromflag
})
}
- if (options && options.goFlaig){
- that.se
- }
// 来自优惠券列表券详情页面的 couponChannelId
if (options && options.couponChannelIdflag) {
that.setData({
couponChannelIdflag: options.couponChannelIdflag
})
}
+ //调查问卷
+ if (options && !options.wjId || options.wjId){
+ this.setData({
+ wjId: options.wjId
+ })
+ }
if (options && options.spellGroup) {
that.setData({
spellGroup: options.spellGroup
@@ -155,6 +158,12 @@ Page({
}
}).then(
function(res) {
+ if(that.data.wjId){
+ app.globalData.skipUrl =`/pages/questionnaire/questionnaire?id=${that.data.wjId}`
+ app.globalData.skip = 'redirectTo'
+ that.judgePhonelngo()
+ return;
+ }
if (that.data.fromflag == 'poster') {
app.globalData.skipUrl = `/pages/canvas/index?couponChannelId=${that.data.couponChannelId}`
app.globalData.skip = 'redirectTo'
diff --git a/pages/index/index.js b/pages/index/index.js
index 093d332..9d9dc7a 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -71,6 +71,8 @@ Page({
} else if (options.type == 'si') {
//活动签到
options.id = this.data.newArr[2];
+ } else if (options.type == 'wj') {
+ options.id = this.data.newArr[2];
}
}
}
@@ -197,6 +199,12 @@ Page({
url: `/pages/acSignIn/index?id=${options.id}`,
})
}
+ //答题问卷
+ else if (options && options.id && app.globalData.type == 'wj') {
+ wx.redirectTo({
+ url: `/pages/questionnaire/questionnaire?id=${options.id}`,
+ })
+ }
// 宣传页详情
else if (options && options.bt && options.id && app.globalData.type == 'bd') {
if (options.bt == '2') {
@@ -400,6 +408,12 @@ Page({
url: `/pages/getuserinfo/index?orderId=${options.orderId}&from='${"discount"}`
})
}
+ // 报名活动页面
+ else if (options && options.id && app.globalData.type == 'ra') {
+ wx.redirectTo({
+ url: `/pages/radetail/index?id=${options.id}`,
+ })
+ }
// 通过分享进入的门店详情
else if (options && options.id && options.frommd == 'md') {
wx.redirectTo({
diff --git a/pages/main/index.js b/pages/main/index.js
index 660e35f..2f42349 100644
--- a/pages/main/index.js
+++ b/pages/main/index.js
@@ -13,7 +13,7 @@ Page({
*/
onLoad: function(options) {
let that = this;
- console.log(options);
+ console.log(options,"跳转地址栏");
wx.showToast({
title: '加载中',
icon: "loading",
@@ -72,6 +72,8 @@ Page({
} else if (options.type == 'si') {
//活动签到
options.id = this.data.newArr[2];
+ } else if (options.type == 'wj'){
+ options.id = this.data.newArr[2];
}
}
}
@@ -196,6 +198,12 @@ Page({
url: `/pages/acSignIn/index?id=${options.id}`,
})
}
+ //问卷答题
+ else if (options && options.id && app.globalData.type == 'wj') {
+ wx.redirectTo({
+ url: `/pages/questionnaire/questionnaire?id=${options.id}`,
+ })
+ }
// 宣传页详情
else if (options && options.bt && options.id && app.globalData.type == 'bd') {
if (options.bt == '2') {
@@ -391,7 +399,20 @@ Page({
wx.redirectTo({
url: `/pages/index/searchbar/detail/index?id=${options.id}`
});
- } else if (app.globalData.type == 'uc') {
+ }
+ // 答题问卷
+ else if (options && options.id && app.globalData.type == 'wj'){
+ wx.redirectTo({
+ url: `/pages/questionnaire/questionnaire?id=${options.id}`,
+ })
+ }
+ // 报名活动页面
+ else if (options && options.id && app.globalData.type == 'ra') {
+ wx.redirectTo({
+ url: `/pages/radetail/index?id=${options.id}`,
+ })
+ }
+ else if (app.globalData.type == 'uc') {
wx.switchTab({
url: '/index/user'
});
diff --git a/pages/questionnaire/questionnaire.js b/pages/questionnaire/questionnaire.js
new file mode 100644
index 0000000..26d6999
--- /dev/null
+++ b/pages/questionnaire/questionnaire.js
@@ -0,0 +1,252 @@
+// pages/questionnaire/questionnaire.js
+const Http = require("../../utils/HttpBasics");
+var config = require("../../config/config.js");
+const util = require("../../utils/util.js");
+var app = getApp();
+const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px'
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ navigationBarHeight,
+ id: "",
+ question: {},
+ userDetails: "",
+ thenDate: "",
+ },
+ //设置选中项
+ setLsit(e) {
+ if (this.data.userDetails != "") {
+ return
+ }
+ let index1 = e.currentTarget.dataset.index1
+ let index2 = e.currentTarget.dataset.index2
+ let tempList = this.data.question
+ if (tempList.topicList[index1].type == 1) {
+ tempList.topicList[index1].answers.map(item => {
+ item.falg = false
+
+ })
+ tempList.topicList[index1].answers[index2].falg = !tempList.topicList[index1].answers[index2].falg
+ } else {
+ tempList.topicList[index1].answers[index2].falg = !tempList.topicList[index1].answers[index2].falg
+ }
+
+ this.setData({
+ question: tempList
+ })
+ },
+ //提交
+ save() {
+ let falg = false
+ let logList = []
+ let tmepData = this.data.question.topicList
+
+ tmepData.map(item => {
+ let tmepObj = {}
+ let tempArr = []
+ tmepObj.topicId = item.id
+ item.answers.map(res => {
+ if (res.falg) {
+ tempArr.push(res.id)
+ item.complete = true
+ }
+ })
+ tmepObj.answer = JSON.stringify(tempArr)
+ logList.push(tmepObj)
+ })
+ tmepData.map(item => {
+ if (item.complete == null) {
+ falg = true
+
+ }
+ })
+ if (falg) {
+ wx.showToast({
+ title: "您还有未答的题目!",
+ icon: 'none',
+ duration: 2000,
+ // mask: false
+ });
+ return true
+ }
+ let param = {
+ questionId: this.data.id,
+ logList: logList
+ }
+ console.log(tmepData)
+ console.log(param, "param")
+ Http.post({
+ url: config.api.submitQuestin,
+ data: param
+ }).then(res => {
+ let str = ""
+ if (this.data.question.rewardCredit) {
+ str = `感谢您的参与,
+ ${this.data.question.rewardCredit}积分已经到账啦`
+ } else {
+ str = `感谢您的参与!`
+ }
+ wx.showToast({
+ title: str,
+ icon: 'none',
+ duration: 2000,
+ success: () => {
+ setTimeout(() => {
+ wx.switchTab({
+ url: '/index/index'
+ })
+ }, 2000)
+
+ }
+ // mask: false
+ });
+ }).catch(err => {
+ wx.showToast({
+ title: err.errMsg,
+ icon: 'none',
+ duration: 2000,
+ // mask: false
+ });
+ })
+ },
+ //是否授权手机号
+ ifPhoneInfo() {
+ let that = this;
+ Http.get({
+ url: config.api.checkPhoneStatus,
+ data: {}
+ }).then(res => {
+ return
+ }).catch(err => {
+ wx.navigateTo({
+ url: `/pages/getuserinfo/index?path=wj&wjId=${this.data.id}`,
+ })
+ })
+ },
+
+ /* 判断是否授权*/
+ userAuthorization() {
+ Http.get({
+ url: config.api.checkUserStatus,
+ data: {
+ token: app.globalData.token
+ }
+ }).then(res => {
+ this.ifPhoneInfo()
+ }).catch(err => {
+ wx.navigateTo({
+ url: `/pages/getuserinfo/index?fromflag=wj&wjId=${this.data.id}`,
+ })
+ })
+ },
+
+ //获取问卷详情
+ getDetail() {
+ let param = {
+ id: this.data.id
+ }
+ Http.get({
+ url: config.api.questionnaireDetail,
+ data: param
+ }).then(res => {
+
+
+ res.data.question.startDate_Sing = util.formatTime(res.data.question.startDate, "yyyy-MM-dd hh:mm")
+ res.data.question.endDate_Sing = util.formatTime(res.data.question.endDate, "yyyy-MM-dd hh:mm")
+ console.log(res.data.question)
+ if (res.data.userDetails) {
+ let temp = res.data.question.topicList
+ temp.map((item, index) => {
+
+ // res.data.userDetails
+ item.answers.map(item2 => {
+ let tempArr = JSON.parse(res.data.userDetails.logList[index].answer)
+ if (tempArr.indexOf(item2.id) != -1) {
+ item2.falg = true
+ }
+ })
+ })
+ this.setData({
+ userDetails: res.data.userDetails
+ })
+ }
+ this.setData({
+ question: res.data.question
+ })
+ }).catch(err => {
+ wx.showToast({
+ title: err.errMsg,
+ icon: 'none',
+ duration: 2000,
+ // mask: false
+ });
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function(options) {
+
+ this.setData({
+ id: options.id,
+
+ })
+ this.getDetail()
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function() {
+ this.userAuthorization()
+ this.setData({
+ thenDate: new Date().getTime()
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function() {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/questionnaire/questionnaire.json b/pages/questionnaire/questionnaire.json
new file mode 100644
index 0000000..55861fa
--- /dev/null
+++ b/pages/questionnaire/questionnaire.json
@@ -0,0 +1,8 @@
+{
+ "usingComponents": {
+ "navbar": "../../components/navbar/navbar"
+ },
+ "navigationBarBackgroundColor": "#FD832D",
+ "navigationBarTextStyle": "white"
+
+}
\ No newline at end of file
diff --git a/pages/questionnaire/questionnaire.wxml b/pages/questionnaire/questionnaire.wxml
new file mode 100644
index 0000000..5fca6f1
--- /dev/null
+++ b/pages/questionnaire/questionnaire.wxml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+ {{question.title}}
+ {{'答题时间:'+question.startDate_Sing+'至'+question.endDate_Sing}}
+ {{question.topDesc}}
+
+
+
+
+ {{ item.type==2? index+1 +'、'+item.title+'(可多选)':index+1 +'、'+item.title}}
+ {{item_2.name}}
+
+ 未开始
+ 已过期
+ 提交
+ 已参与
+ 已下线
+ 已上线
+
\ No newline at end of file
diff --git a/pages/questionnaire/questionnaire.wxss b/pages/questionnaire/questionnaire.wxss
new file mode 100644
index 0000000..30c4790
--- /dev/null
+++ b/pages/questionnaire/questionnaire.wxss
@@ -0,0 +1,117 @@
+/* pages/questionnaire/questionnaire.wxss */
+
+page {
+ overflow-y: scroll !important;
+}
+
+.Box {
+ background-color: rgba(242, 242, 242, 1);
+ overflow: hidden;
+}
+
+.imgBox {
+ width: 96%;
+ height: 300rpx;
+ margin: 20rpx 15rpx;
+ border-radius: 6rpx;
+ /* background-color: aqua; */
+}
+
+.titleBox {
+ width: 96%;
+ margin: auto;
+}
+
+.title {
+ font-size: 36rpx;
+ font-weight: 700;
+ color: #999;
+ margin-top: 10rpx;
+}
+
+.content {
+ padding: 20rpx 0;
+ color: #999;
+ font-size: 32rpx;
+ /* overflow: hidden;
+ text-overflow: ellipsis;
+ height: 70rpx;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 2; */
+}
+.hidBox{
+ width: 100%;
+ height: 100%;
+ position: fixed;
+ top: 0;
+ left: 0;
+ background-color: rgba(0, 0, 0, 0.2)
+}
+.contcBox{
+ width: 80%;
+ height: 300rpx;
+ background-color: #fff;
+
+}
+.time{
+ font-size: 32rpx;
+ padding: 10rpx 0;
+ color: #999;
+}
+.oneBox {
+ width: 96%;
+ margin: 20rpx auto;
+ background-color: #fff;
+ border-radius: 6rpx;
+ padding-bottom: 20rpx;
+}
+
+.moreBox {
+ width: 96%;
+ margin: 20rpx auto;
+ background-color: #fff;
+ border-radius: 6rpx;
+ padding-bottom: 20rpx;
+}
+
+.oneTitle {
+ font-weight: 700;
+ padding: 10rpx;
+ font-size: 36rpx;
+ margin: 10rpx auto;
+}
+
+.item_hie {
+ text-align: center;
+ line-height: 68rpx;
+ margin-top: 10rpx;
+}
+
+.item_show {
+ text-align: center;
+ line-height: 68rpx;
+ color: #fff;
+ background-color: rgba(243, 151, 56, 1);
+ margin-top: 10rpx;
+}
+.submit{
+ width: 600rpx;
+ height: 80rpx;
+ background-color: rgba(0, 153, 255, 1);
+ color: #fff;
+ text-align: center;
+ line-height: 80rpx;
+ border-radius: 6rpx;
+ margin: 20rpx auto;
+}
+.invalid{
+ width: 600rpx;
+ height: 80rpx;
+ background-color: rgba(0, 0, 0, 0.2);
+ color: #fff;
+ text-align: center;
+ line-height: 80rpx;
+ border-radius: 6rpx;
+ margin: 20rpx auto;
+}
\ No newline at end of file
diff --git a/pages/questionnaire/questionnaireLsit/questionnaireLsit.js b/pages/questionnaire/questionnaireLsit/questionnaireLsit.js
new file mode 100644
index 0000000..3a99871
--- /dev/null
+++ b/pages/questionnaire/questionnaireLsit/questionnaireLsit.js
@@ -0,0 +1,121 @@
+// pages/questionnaire/questionnaireLsit/questionnaireLsit.js
+const Http = require("../../../utils/HttpBasics");
+var config = require("../../../config/config.js");
+var app = getApp();
+var app = getApp();
+const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px'
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ navigationBarHeight,
+ list: [],
+ pageNum: 1,
+ pageSize: 4,
+ thenDate:"",
+ },
+ goDetails(e){
+ let id = e.currentTarget.dataset.id
+ console.log(id)
+ wx.navigateTo({
+ url: `/pages/questionnaire/questionnaire?id=${id}`,
+ })
+ },
+ getQuest() { //查询问卷
+ let param = {
+ pageNum: this.data.pageNum,
+ pageSize: this.data.pageSize
+ }
+ Http.get({
+ url: config.api.questionnaire,
+ data: param
+ }).then(res => {
+ if(this.data.pageNum<=1){
+ let temp = res.data.list
+ this.setData({
+ list: temp
+ })
+ }else{
+ let temp = res.data.list
+ let formerLsit = this.data.list
+ formerLsit.push(...temp)
+ this.setData({
+ list:formerLsit
+ })
+ }
+ }).catch(err=>{
+ wx.showToast({
+ title: err.errMsg,
+ icon: 'none',
+ duration: 2000,
+ // mask: false
+ });
+ })
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ this.getQuest()
+ this.setData({
+ thenDate: new Date().getTime()
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ console.log("我到底了!")
+ let pageNumFlge = this.data.pageNum+1
+ this.setData({
+ pageNum: pageNumFlge
+ })
+ this.getQuest()
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/questionnaire/questionnaireLsit/questionnaireLsit.json b/pages/questionnaire/questionnaireLsit/questionnaireLsit.json
new file mode 100644
index 0000000..672657b
--- /dev/null
+++ b/pages/questionnaire/questionnaireLsit/questionnaireLsit.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "navbar": "../../components/navbar/navbar"
+ },
+ "navigationBarBackgroundColor": "#FD832D",
+ "navigationBarTextStyle": "white"
+}
\ No newline at end of file
diff --git a/pages/questionnaire/questionnaireLsit/questionnaireLsit.wxml b/pages/questionnaire/questionnaireLsit/questionnaireLsit.wxml
new file mode 100644
index 0000000..f134069
--- /dev/null
+++ b/pages/questionnaire/questionnaireLsit/questionnaireLsit.wxml
@@ -0,0 +1,18 @@
+
+
+ 敬请期待!
+
+
+
+
+ {{item.title}}
+ {{item.topDesc}}
+
+ 已完成
+ 未开始
+ 已结束
+ {{thenDate}}
+ {{item.startDate}}
+ {{item.endDate}}
+
+
diff --git a/pages/questionnaire/questionnaireLsit/questionnaireLsit.wxss b/pages/questionnaire/questionnaireLsit/questionnaireLsit.wxss
new file mode 100644
index 0000000..553a374
--- /dev/null
+++ b/pages/questionnaire/questionnaireLsit/questionnaireLsit.wxss
@@ -0,0 +1,71 @@
+/* pages/questionnaire/questionnaireLsit/questionnaireLsit.wxss */
+
+page {
+ overflow-y: scroll !important;
+}
+
+.questionLsi {
+ background-color: #fff;
+ border-radius: 6rpx;
+ margin: 20rpx auto;
+ overflow: hidden;
+ width: 96%;
+ position: relative;
+ height: 520rpx;
+}
+
+.img {
+ width: 96%;
+ margin: 20rpx 16rpx;
+ /* background-color: aqua; */
+ height: 300rpx;
+}
+
+.title {
+ width: 96%;
+ font-size: 36rpx;
+ font-weight: 700;
+ color: #999;
+ margin: auto;
+}
+
+.conten {
+ width: 96%;
+ padding: 20rpx 0;
+ color: #999;
+ font-size: 32rpx;
+ margin: 0 auto 20rpx auto;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ height: 70rpx;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 2;
+}
+
+.accomplish {
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ background-color: rgb(0, 0, 0, 0.2);
+ text-align: center;
+ line-height: 480rpx;
+ color: #fff;
+ font-size: 36rpx;
+ font-weight: 700;
+}
+
+.noData {
+ width: 100%;
+ z-index: 1000;
+ position: fixed;
+ top: 0;
+ left: 0;
+ text-align: center;
+ line-height: 100vh;
+ height: 100vh;
+ background-color: rgb(0, 0, 0, 0.2);
+ color: #fff;
+}
diff --git a/project.config.json b/project.config.json
index b3b75cc..6336fc1 100644
--- a/project.config.json
+++ b/project.config.json
@@ -31,7 +31,7 @@
"userConfirmedUseCompilerModuleSwitch": false
},
"compileType": "miniprogram",
- "libVersion": "2.16.0",
+ "libVersion": "2.14.4",
"appid": "wxfa336cad86ed598d",
"projectname": "oldC",
"isGameTourist": false,
@@ -109,6 +109,20 @@
"pathName": "pages/dateLsit/dateLsit",
"query": "",
"scene": null
+ },
+ {
+ "id": -1,
+ "name": "投书建议",
+ "pathName": "pages/complaint/complaint",
+ "query": "",
+ "scene": null
+ },
+ {
+ "id": 8,
+ "name": "pages/questionnaire/questionnaireLsit/questionnaireLsit",
+ "pathName": "pages/questionnaire/questionnaireLsit/questionnaireLsit",
+ "query": "",
+ "scene": null
}
]
}