From c2c133e01fa57fc90461ed788690fd484c309f44 Mon Sep 17 00:00:00 2001 From: xpz2018 <107107461@qq.com> Date: Wed, 22 Sep 2021 14:02:00 +0800 Subject: [PATCH] no message --- assets/image/icon-feedback.png | Bin 0 -> 1567 bytes components/select-view/index.wxml | 2 +- pages/agent/edit/index.wxml | 3 +- pages/agent/fragment/index.wxml | 2 +- pages/article/feedback/index.js | 146 ++++++++++++------------------ pages/article/feedback/index.json | 1 + pages/article/feedback/index.wxml | 60 ++++++------ pages/article/feedback/index.wxss | 60 +----------- pages/mall/fragment/index.wxml | 4 +- pages/moment/fragment/index.js | 8 +- pages/moment/fragment/index.wxml | 8 +- pages/moment/fragment/index.wxss | 21 +++++ 12 files changed, 134 insertions(+), 181 deletions(-) create mode 100644 assets/image/icon-feedback.png diff --git a/assets/image/icon-feedback.png b/assets/image/icon-feedback.png new file mode 100644 index 0000000000000000000000000000000000000000..7152587081cbce2c9f0c1a1482f3df6f1ea8249b GIT binary patch literal 1567 zcmYjRdoMz}Fh<5aE?cIO=sI*MdAoTXO!I6-lr)OC zv`A#G$MjHnL{5o>(t~2`cjt7@z4wpL=ll77zn}B{p6@^3EDy4)f}EBd000UkBAz0N zVOxMnN!Zna!IXq;$8l~r0JxJUzY!uW$ssWmS7(4H)R~tgc*Zdj)6ESqk!TnI$zTE7 zwk#58NdN#+TnMl=3$j(?LjUcCai#v#TSklfQ<5bB-Q%b?;VA3O`ue&^B$6-)f)f6} zkm$9wwO{!Wrcp4b2h7q} zDv&HvJWC;a0X{ZNmHa-$;zUI{pO>;!hL)VWO2Xs3!>1mUj+NG-;YoDQk&BH9k#yK&d1w4j!v{Nm&V% z6rvC-TjqD3IJAeO=X>3spfL2Jg?HM~7@6=nN@DqsbS2Vod?MFL6Z}p%U#>J#pw+BH})0@06a( zXQ`}~3_Oy>SmKE-P&i(i!y(Ehtq)Tjep{i?i?~LYZ-bkoifs1Blmr}Ksc}nav87Zd zj-yD?GE`UDdHUqaWxO}6x9xnycp7eF4xFvHp`@U0XS!ax>Rk~+C9FP?u+-c8>bed4yzG~&S6ZX zA-uQ^=?g6;vWly+4N8ngH)}fU^8`qlrv>>sfiAFwncv+rzRMLCWU7yIDcr?Bx+axe z(Y|}9;|4M29<0_&siW@psKIi2{a;99gF3cj`ss@Y{WB^bOn;e`j%8C2URrWDT@;8d|kSqs;1s+PHeK?U}1G?$gRw^)Gz`|4w7HK9Dt-~ zHYATgy5qDlLH>*6CT_FM{@^C)z71L9r33d$RWTa(Ld~cAbK^^;bzgaT$E(j$LZ=*i z;&Z8@_Wmy;C5j&G?KfLfzLCv1`PG$Gr=pWC*8+Fq-zltV-OJG>f9;YHW|;JjA%_>= z5#*l+Fr;VDr|!z=-`VjJ8%6Sf=%i%OJU`cHr4U=5(`V8VKBGp_FrABP1o&(b3wgzn z)I5WJKi#@)xPqN%VJVs5Pd%|SoW9qWuE%eG66|O+3YNHFeX^45-Q|zy9RIYvMDU?$uCJ*HR|oFlvbZdwEnBY<%L&j&z|3 - 取消 + 取消 确定 diff --git a/pages/agent/edit/index.wxml b/pages/agent/edit/index.wxml index 6d6b9b1..dab66f0 100644 --- a/pages/agent/edit/index.wxml +++ b/pages/agent/edit/index.wxml @@ -90,7 +90,8 @@ - + + 备注信息 diff --git a/pages/agent/fragment/index.wxml b/pages/agent/fragment/index.wxml index 5256779..f37db08 100644 --- a/pages/agent/fragment/index.wxml +++ b/pages/agent/fragment/index.wxml @@ -13,7 +13,7 @@ - + diff --git a/pages/article/feedback/index.js b/pages/article/feedback/index.js index cdf49bf..449ffdd 100644 --- a/pages/article/feedback/index.js +++ b/pages/article/feedback/index.js @@ -1,17 +1,21 @@ import { getAllFactoryList, feedbackMillInformation } from "../../../api/ztb" const util = require('../../../utils/util') +const app = getApp() + Page({ /** * 页面的初始数据 */ data: { - millIdList: [], + safeBottom: app.globalData.safeBottom, + fatoryName: null, fatoryNameList: [], - fatoryNameIndex: null, - typeIdList: ['1', '2', '3'], - typeList: ['价格', '纸厂排队', '最近扣点'], - typeIndex: null, + typeList: [ + {value: '1', text: '价格'}, + {value: '2', text: '纸厂排队'}, + {value: '3', text: '最近扣点'} + ], postForm: { content: '', millId: null, @@ -23,63 +27,21 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - this.getAllFactoryListFct() - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function () { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function () { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function () { - + wx.showLoading({ title: '加载中', mask: true }) + getAllFactoryList().then(result => { + var fatoryNameList = [] + result.data.forEach(element => { + fatoryNameList.push({value: element.paperMillId, text: element.name}) + }) + this.setData({ fatoryNameList, safeBottom: app.globalData.safeBottom }) + wx.hideLoading() + }).catch(err => { + wx.hideLoading() + util.showToast(err) + }) }, - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () { - - }, - /** - * 分享至朋友圈 - */ - onShareTimeline: function () { - }, + PickerChange(e) { console.log(e); this.setData({ @@ -94,52 +56,56 @@ Page({ '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 - }) - - }) + showPicker: function(e){ + this.pickerView = this.pickerView || this.selectComponent('#picker-view') + if(e.currentTarget.id == 'millId'){ + this.pickerView.showPicker(this.data.fatoryNameList, this.data.postForm.millId, 1) + } else { + this.pickerView.showPicker(this.data.typeList, this.data.postForm.type, 2) + } + this.setData({ picking: true }) + }, + onPickerChange: function ({detail}) { + this.setData({ picking: false }) + if(!detail){ + return + } + if(detail.type == 1){ + this.data.postForm.millId = detail.value + this.setData({ fatoryName: detail.text }) + } else if(detail.type == 2){ + this.data.postForm.type = detail.value + this.setData({ typeName: detail.text }) + } }, subFeedBack: function () { - if (this.data.postForm.millId == '' || this.data.postForm.millId == null) { + if (util.isEmpty(this.data.postForm.millId)) { util.showToast('请选择纸厂') return } - if (this.data.postForm.type == '' || this.data.postForm.type == null) { + if (util.isEmpty(this.data.postForm.type)) { util.showToast('请选类型') return } - if (this.data.postForm.content == '' || this.data.postForm.content == null) { + if (util.isEmpty(this.data.postForm.content)) { util.showToast('请填写内容') return } - 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 => { + wx.showLoading({ title: '处理中', mask: true }) + feedbackMillInformation(this.data.postForm).then(res => { + wx.hideLoading() if (res.code == 0) { util.showToast('提交成功!') - util.navigateTo('/pages/article/sucessful/index') + wx.redirectTo({ url: '/pages/article/sucessful/index'}) } else { util.showToast('提交失败失败!原因:' + res.message) } + }).catch(err => { + wx.hideLoading() + util.showToast(err) }) + }, + bindInput: function (e) { + this.setData({ 'postForm.content': e.detail.value }) } }) \ No newline at end of file diff --git a/pages/article/feedback/index.json b/pages/article/feedback/index.json index c791e97..973018c 100644 --- a/pages/article/feedback/index.json +++ b/pages/article/feedback/index.json @@ -1,5 +1,6 @@ { "usingComponents": { + "wux-button": "/components/button/index", "select-view": "/components/select-view/index" } } \ No newline at end of file diff --git a/pages/article/feedback/index.wxml b/pages/article/feedback/index.wxml index 707153b..05979e5 100644 --- a/pages/article/feedback/index.wxml +++ b/pages/article/feedback/index.wxml @@ -2,39 +2,41 @@ 反馈情报 - - - - 反馈纸厂 - - - {{fatoryNameIndex?fatoryNameList[fatoryNameIndex]:'请选择纸厂'}} - - - - - - - 反馈类型 - - - {{typeIndex?typeList[typeIndex]:'请选择反馈类型'}} - - + + + + + 反馈纸厂: + + {{fatoryName||'请选择纸厂'}} + + - - - 反馈内容 - - - - + + + 反馈类型: + + {{typeName || '请选择反馈类型'}} + - - 提交反馈 + + + + 反馈内容 + + + {{form.remark?form.remark:'请输入反馈内容,最多200字'}} + + + + + + 提交反馈 + - \ No newline at end of file + diff --git a/pages/article/feedback/index.wxss b/pages/article/feedback/index.wxss index ce0b89b..05c21d9 100644 --- a/pages/article/feedback/index.wxss +++ b/pages/article/feedback/index.wxss @@ -1,57 +1,7 @@ /* pages/article/feedback/index.wxss */ -page { - background-color: white; -} - -.zt { - width: 100%; - padding: 0rpx 32rpx 0rpx 32rpx; -} - -.view1 { - padding: 0rxp; - width: 100%; - border-bottom: 2rpx solid #f3f3f3; -} - -.view2 { - width: 100%; - - border-bottom: 2rpx solid #f3f3f3; -} - -.view3 { - width: 100%; - height: 394rpx; - /* border-top: 2rpx solid #f3f3f3; */ -} - -.textarea { - height: 306rpx; - -} - -.textareaView { - border: 1px solid #dfdfdf; -} - -.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; +.textarea{ + width:100%; + height: 120px; + padding:0px 30rpx; + font-size: 14px; } \ No newline at end of file diff --git a/pages/mall/fragment/index.wxml b/pages/mall/fragment/index.wxml index 4fa06c7..ac4ce71 100644 --- a/pages/mall/fragment/index.wxml +++ b/pages/mall/fragment/index.wxml @@ -51,8 +51,8 @@ - {{item.title}} - {{item.updateTime}} + {{item.title}} + {{item.updateTime}} diff --git a/pages/moment/fragment/index.js b/pages/moment/fragment/index.js index 962bc8f..5ad206d 100644 --- a/pages/moment/fragment/index.js +++ b/pages/moment/fragment/index.js @@ -20,6 +20,7 @@ Component({ */ data: { height: app.globalData.safeFragmentHeight - 270, + safeBottom: app.globalData.safeBottom, kg: app.globalData.kg, firstShow: false, noticeList: [], @@ -43,6 +44,7 @@ Component({ height: app.globalData.safeFragmentHeight - 270, StatusBar: app.globalData.StatusBar || 40, customHeight: app.globalData.customHeight, + safeBottom: app.globalData.safeBottom, tabIndex: 0, firstShow: true }) @@ -71,6 +73,9 @@ Component({ chooseCity: function(){ wx.navigateTo({url: `/pages/home/city-select/index?type=1` }) }, + feedback: function(){ + util.navigateTo('/pages/article/feedback/index') + }, searchList: function(){ util.navigateTo('/pages/mall/search-list/index') }, @@ -100,7 +105,8 @@ Component({ }) }, toNotice: function(e){ - + var item = this.data.noticeList[e.currentTarget.dataset.index] + console.log(item) }, onResume: function(){ var fragment = null diff --git a/pages/moment/fragment/index.wxml b/pages/moment/fragment/index.wxml index 4c5c6ef..a90c53f 100644 --- a/pages/moment/fragment/index.wxml +++ b/pages/moment/fragment/index.wxml @@ -44,4 +44,10 @@ - \ No newline at end of file + + + + + + + \ No newline at end of file diff --git a/pages/moment/fragment/index.wxss b/pages/moment/fragment/index.wxss index 1ca6fe3..9dde67c 100644 --- a/pages/moment/fragment/index.wxss +++ b/pages/moment/fragment/index.wxss @@ -32,4 +32,25 @@ overflow: hidden; text-overflow: ellipsis; text-align: center; +} + +.booking-tool { + width: calc(100% - 20px); + background-color: #fff; + position: fixed; + left: 25px; +} + +.roder-add { + display: flex; + justify-content: center; + align-items: center; + width: 100rpx; + height: 100rpx; + background-color: #fff; + border-radius: 50rpx; + position: absolute; + top: 24px; + right: 24px; + box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16); } \ No newline at end of file