diff --git a/app.json b/app.json index 06a2002..7f25e6e 100644 --- a/app.json +++ b/app.json @@ -36,6 +36,7 @@ "pages/article/feedback/index", "pages/article/list/index", "pages/article/attentionPaperFactory/index", + "pages/article/sucessFul/index", "pages/goods/ablility/index", "pages/goods/index/index", "pages/goods/detail/index", diff --git a/assets/info/sucessful.png b/assets/info/sucessful.png new file mode 100644 index 0000000..4dfcb5b Binary files /dev/null and b/assets/info/sucessful.png differ diff --git a/pages/api/ztb.js b/pages/api/ztb.js index 8dab779..7f50b8c 100644 --- a/pages/api/ztb.js +++ b/pages/api/ztb.js @@ -129,7 +129,8 @@ const updateUserInfoZtb = (params) => mPost(`/recycle-service/user/update/user-i const userPushFollowMill = (params) => mPost(`/recycle-service/user/push/follow-mill`, params, zconfig) //用户在情报中获取纸厂 const getPaperMillOfInformationList = (params) => mGet(`/recycle-service/get/paper-mill-of-information-list`, params, zconfig) - +//反馈纸厂情报 +const feedbackMillInformation = (params) => mPost(`/recycle-service/feedback/mill-information`, params, zconfig) export { @@ -226,5 +227,6 @@ export { updateUserInfo, updateUserInfoZtb, userPushFollowMill, - getPaperMillOfInformationList + getPaperMillOfInformationList, + feedbackMillInformation } \ No newline at end of file diff --git a/pages/article/feedback/index.js b/pages/article/feedback/index.js index a7bdcb1..b9665bf 100644 --- a/pages/article/feedback/index.js +++ b/pages/article/feedback/index.js @@ -1,19 +1,30 @@ // pages/article/feedback/index.js +import { getAllFactoryList,feedbackMillInformation} from "../../api/ztb" +const util = require('../../../utils/util') Page({ /** * 页面的初始数据 */ data: { - picker: ['喵喵喵', '汪汪汪', '哼唧哼唧'], - index: null, - + millIdList:[], + fatoryNameList: [], + fatoryNameIndex: null, + typeIdList:['1','2','3'], + typeList:['价格','纸厂排队','最近扣点'], + typeIndex:null, + postForm:{ + content:'', + millId:null, + type:null + } }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { + this.getAllFactoryListFct() }, @@ -68,7 +79,51 @@ Page({ PickerChange(e) { console.log(e); this.setData({ - index: e.detail.value + fatoryNameIndex: e.detail.value, + 'postForm.millId':this.data.millIdList[e.detail.value] }) }, + typeChange(e) { + console.log(e); + this.setData({ + typeIndex: e.detail.value, + 'postForm.type':this.data.typeIdList[e.detail.value] + }) + }, + getAllFactoryListFct:function(){ + this.data.fatoryNameList=[] + this.data.millIdList=[] + var jxFatoryNameList=[] + var jxMillIdList=[] + getAllFactoryList().then(res=>{ + res.data.forEach(element => { + jxFatoryNameList.push(element.name) + jxMillIdList.push(element.paperMillId) + }); + this.setData({ + fatoryNameList: jxFatoryNameList, + millIdList:jxMillIdList + }) + + }) + }, + subFeedBack:function(){ + this.feedbackMillInformationFct(this.data.postForm) + }, + textareaBindblur:function(e){ + // console.log(e.detail.value) + this.setData({ + 'postForm.content':e.detail.value + }) + }, + feedbackMillInformationFct:function(model){ + feedbackMillInformation(model).then(res=>{ + if(res.code==0){ + util.showToast('提交成功!') + util.navigateTo('/pages/article/sucessFul/index') + }else{ + util.showToast('提交失败失败!原因:'+res.message) + } + }) + } }) \ No newline at end of file diff --git a/pages/article/feedback/index.wxml b/pages/article/feedback/index.wxml index 33c5d7f..432de66 100644 --- a/pages/article/feedback/index.wxml +++ b/pages/article/feedback/index.wxml @@ -6,9 +6,9 @@ 反馈纸厂 - + - {{index?picker[index]:'禁止换行,超出容器部分会以 ... 方式截断'}} + {{fatoryNameIndex?fatoryNameList[fatoryNameIndex]:'请选择纸厂'}} @@ -16,9 +16,9 @@ 反馈类型 - + - {{index?picker[index]:'禁止换行,超出容器部分会以 ... 方式截断'}} + {{typeIndex?typeList[typeIndex]:'请选择反馈类型'}} @@ -27,9 +27,15 @@ 反馈内容 - - + + + + + + + + 提交反馈 \ No newline at end of file diff --git a/pages/article/feedback/index.wxss b/pages/article/feedback/index.wxss index 8367264..23821d4 100644 --- a/pages/article/feedback/index.wxss +++ b/pages/article/feedback/index.wxss @@ -1,30 +1,57 @@ /* pages/article/feedback/index.wxss */ -page{ +page { background-color: white; } -.zt{ + +.zt { width: 100%; padding: 0rpx 32rpx 0rpx 32rpx; } -.view1{ + +.view1 { width: 100%; height: 100rpx; border-top: 2rpx solid #f3f3f3; } -.view2{ + +.view2 { width: 100%; height: 100rpx; border-top: 2rpx solid #f3f3f3; } -.view3{ + +.view3 { width: 100%; height: 394rpx; border-top: 2rpx solid #f3f3f3; } -.textarea{ - height:306rpx; - + +.textarea { + height: 306rpx; + } -.textareaView{ + +.textareaView { border: 1px solid; +} + +.view4 { + width: 100%; + height: 96rpx; + margin-top: 400rpx; +} + +.sbtn { + width: 686rpx; + height: 96rpx; + background: #007AFF; + border-radius: 8rpx; + border-radius: 8rpx; + font-family: PingFangSC-Regular; + font-size: 36rpx; + color: #FFFFFF; + letter-spacing: 0; + text-align: left; + line-height: 96rpx; + text-align: center; } \ No newline at end of file diff --git a/pages/article/sucessFul/index.js b/pages/article/sucessFul/index.js new file mode 100644 index 0000000..3c07772 --- /dev/null +++ b/pages/article/sucessFul/index.js @@ -0,0 +1,70 @@ +// pages/article/sucessFul/index.js +const util = require('../../../utils/util') +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + }, + rt:function(){ + wx.navigateBack() + } +}) \ No newline at end of file diff --git a/pages/article/sucessFul/index.json b/pages/article/sucessFul/index.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/article/sucessFul/index.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/article/sucessFul/index.wxml b/pages/article/sucessFul/index.wxml new file mode 100644 index 0000000..a7370e3 --- /dev/null +++ b/pages/article/sucessFul/index.wxml @@ -0,0 +1,11 @@ + + + + + + 您反馈的情报信息已查收,谢谢您对平台的参与和支持。 + + 关闭 + + + \ No newline at end of file diff --git a/pages/article/sucessFul/index.wxss b/pages/article/sucessFul/index.wxss new file mode 100644 index 0000000..f45ed74 --- /dev/null +++ b/pages/article/sucessFul/index.wxss @@ -0,0 +1,35 @@ +/* pages/article/sucessFul/index.wxss */ +page { + background-color: white; +} + +.view1 { + padding: 120rpx 275rpx 97rpx 275.8rpx; +} + +.view2 { + font-family: PingFangSC-Regular; + font-size: 32rpx; + color: rgba(0, 0, 0, 0.75); + text-align: center; + padding-left: 55rpx; + padding-right: 55rpx; +} + +.view3 { + padding-left: 32rpx; + padding-right: 32rpx; + margin-top: 80rpx; +} + +.btnView { + background: #007AFF; + height: 96rpx; + border-radius: 8rpx; + border-radius: 8rpx; + font-family: PingFangSC-Regular; + font-size: 36rpx; + color: #FFFFFF; + text-align: center; + line-height: 96rpx; +} \ No newline at end of file