Commit 623ae704114b4ac1aa8bad8f544c64fa5cdfca2a
1 parent
0e4557ab3e
Exists in
dev_wjl
and in
1 other branch
添加回馈页面
Showing 15 changed files with 574 additions and 26 deletions
- littleApp_child/app.json
- littleApp_child/packageA/pages/feedbacklist/feedbacklist.js
- littleApp_child/packageA/pages/feedbacklist/feedbacklist.json
- littleApp_child/packageA/pages/feedbacklist/feedbacklist.wxml
- littleApp_child/packageA/pages/feedbacklist/feedbacklist.wxss
- littleApp_child/packageA/pages/feedbackxq/feedbackxq.js
- littleApp_child/packageA/pages/feedbackxq/feedbackxq.json
- littleApp_child/packageA/pages/feedbackxq/feedbackxq.wxml
- littleApp_child/packageA/pages/feedbackxq/feedbackxq.wxss
- littleApp_child/pages/Setting/Setting.js
- littleApp_child/pages/feedback/feedback.js
- littleApp_child/pages/feedback/feedback.wxml
- littleApp_child/pages/feedback/feedback.wxss
- littleApp_child/pages/home/home.wxml
- littleApp_child/utils/apiFile.js
littleApp_child/app.json
View file @
623ae70
| ... | ... | @@ -58,7 +58,9 @@ |
| 58 | 58 | "pages/serviceNotice/serviceNotice", |
| 59 | 59 | "pages/eatAddress/eatAddress", |
| 60 | 60 | "pages/messageNotification/messageNotification", |
| 61 | - "pages/messageContent/messageContent" | |
| 61 | + "pages/messageContent/messageContent", | |
| 62 | + "pages/feedbacklist/feedbacklist", | |
| 63 | + "pages/feedbackxq/feedbackxq" | |
| 62 | 64 | ] |
| 63 | 65 | } |
| 64 | 66 | ], |
littleApp_child/packageA/pages/feedbacklist/feedbacklist.js
View file @
623ae70
| 1 | +// pages/messageNotification/message.js | |
| 2 | + | |
| 3 | +// 网络请求工具类 | |
| 4 | +var networkUtil = require('../../../utils/network_util.js') | |
| 5 | +var api = require('../../../utils/apiFile.js') | |
| 6 | +Page({ | |
| 7 | + | |
| 8 | + /** | |
| 9 | + * 页面的初始数据 | |
| 10 | + */ | |
| 11 | + data: { | |
| 12 | + notificationList:[], // 消息通知列表 | |
| 13 | + currentPage: 1, // 当前页码 | |
| 14 | + limit: 10, // 每页显示的数据条数 | |
| 15 | + hasMoreData: true, // 是否有更多数据可加载 | |
| 16 | + babyId:null, | |
| 17 | + formattedDate:null | |
| 18 | + }, | |
| 19 | + | |
| 20 | + //获取消息通知 | |
| 21 | + getNotificationList:function(){ | |
| 22 | + | |
| 23 | + }, | |
| 24 | + formatDate(milliseconds) { | |
| 25 | + // 创建 Date 对象 | |
| 26 | + const date = new Date(milliseconds); | |
| 27 | + | |
| 28 | + // 格式化日期和时间 | |
| 29 | + const year = date.getFullYear(); | |
| 30 | + const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份是从0开始的 | |
| 31 | + const day = String(date.getDate()).padStart(2, '0'); | |
| 32 | + const hours = String(date.getHours()).padStart(2, '0'); | |
| 33 | + const minutes = String(date.getMinutes()).padStart(2, '0'); | |
| 34 | + const seconds = String(date.getSeconds()).padStart(2, '0'); | |
| 35 | + | |
| 36 | + // 拼接成 YYYY-MM-DD HH:MM:SS 格式 | |
| 37 | + return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; | |
| 38 | +} , | |
| 39 | + // 下拉加载 | |
| 40 | + loadMore:function(){ | |
| 41 | + const self = this; | |
| 42 | + if (!self.data.hasMoreData) { | |
| 43 | + return; // 如果没有更多数据,不执行任何操作 | |
| 44 | + } | |
| 45 | + // 使用 setData 更新页面状态为正在加载 | |
| 46 | + self.setData({ | |
| 47 | + isLoading: true | |
| 48 | + }); | |
| 49 | + networkUtil._get(api.getfeedback, { | |
| 50 | + page: self.data.currentPage, | |
| 51 | + limit: self.data.limit, | |
| 52 | + babyId:self.data.babyId, | |
| 53 | + }, function(res) { | |
| 54 | + if (res.data && res.data.data.length > 0) { | |
| 55 | + let newData = self.data.notificationList.concat(res.data.data); | |
| 56 | + newData.forEach((item,index)=>{ | |
| 57 | + if(item.created){ | |
| 58 | + newData[index].createdstr=self.formatDate(item.created) | |
| 59 | + } | |
| 60 | + }) | |
| 61 | + self.setData({ | |
| 62 | + notificationList: newData, | |
| 63 | + currentPage: self.data.currentPage + 1, | |
| 64 | + isLoading: false | |
| 65 | + }); | |
| 66 | + // 判断是否还有更多数据 | |
| 67 | + const hasMoreData = res.data.pageInfo.page < res.data.pageInfo.lastPage | |
| 68 | + // 更新页面数据(假设你在微信小程序或其他使用setData方法的框架中) | |
| 69 | + self.setData({ | |
| 70 | + hasMoreData: hasMoreData | |
| 71 | + }); | |
| 72 | + | |
| 73 | + wx.hideToast(); | |
| 74 | + } else { | |
| 75 | + // 如果没有返回数据,表示没有更多数据了 | |
| 76 | + self.setData({ | |
| 77 | + hasMoreData: false, | |
| 78 | + isLoading: false | |
| 79 | + }); | |
| 80 | + } | |
| 81 | + }, function(res) { | |
| 82 | + networkUtil.showErrorToast(res.errormsg); | |
| 83 | + wx.hideToast(); | |
| 84 | + }); | |
| 85 | + }, | |
| 86 | + | |
| 87 | + // 跳转 | |
| 88 | + messageBtn:function(e){ | |
| 89 | + const id = e.currentTarget.dataset.index | |
| 90 | + const str=e.currentTarget.dataset.item | |
| 91 | + if(id){ | |
| 92 | + wx.setStorageSync('feedxq', JSON.stringify(str)) | |
| 93 | + setTimeout(() =>{ | |
| 94 | + wx.navigateTo({ | |
| 95 | + url: `/packageA/pages/feedbackxq/feedbackxq?id=${id}`, | |
| 96 | + }) | |
| 97 | + },100) | |
| 98 | + } else { | |
| 99 | + return | |
| 100 | + } | |
| 101 | + }, | |
| 102 | + // 快速预约课程 | |
| 103 | + goAddQuestion: function(e) { | |
| 104 | + networkUtil.showLoading(); | |
| 105 | + var self = this; | |
| 106 | + wx.showModal({ | |
| 107 | + title: '提示', | |
| 108 | + confirmText: '线上', | |
| 109 | + content:`您目前是要线上预约还是现场预约?`, | |
| 110 | + cancelText: '现场', | |
| 111 | + success(res) { | |
| 112 | + if (res.confirm) { | |
| 113 | + var param = { courseId: e.target.dataset.id, type: 1 }; | |
| 114 | + networkUtil._get(api.orderCourse, param, function(res) { | |
| 115 | + if (res.data.errorcode == 0) { | |
| 116 | + networkUtil.showToast('预约成功'); | |
| 117 | + self.loadMore(); | |
| 118 | + } | |
| 119 | + }, | |
| 120 | + function(res) { | |
| 121 | + networkUtil.showErrorToast(res.errormsg); | |
| 122 | + wx.hideToast(); | |
| 123 | + }); | |
| 124 | + } else if (res.cancel) { | |
| 125 | + var param = { courseId: e.target.dataset.id, type: 2 }; | |
| 126 | + networkUtil._get(api.orderCourse, param, function(res) { | |
| 127 | + // console.log(ress,'res'); | |
| 128 | + if (res.data.errorcode == 0) { | |
| 129 | + networkUtil.showToast('预约成功'); | |
| 130 | + self.loadMore(); | |
| 131 | + } | |
| 132 | + } | |
| 133 | + , function(res) { | |
| 134 | + networkUtil.showErrorToast(res.errormsg); | |
| 135 | + wx.hideToast(); | |
| 136 | + } | |
| 137 | + ); | |
| 138 | + } | |
| 139 | + } | |
| 140 | + }); | |
| 141 | + }, | |
| 142 | + /** | |
| 143 | + * 生命周期函数--监听页面加载 | |
| 144 | + */ | |
| 145 | + onLoad(options) { | |
| 146 | + networkUtil.showLoading() | |
| 147 | + console.log('options',options); | |
| 148 | + this.setData({ | |
| 149 | + babyId:options.id | |
| 150 | + }) | |
| 151 | + }, | |
| 152 | + | |
| 153 | + /** | |
| 154 | + * 生命周期函数--监听页面初次渲染完成 | |
| 155 | + */ | |
| 156 | + onReady() { | |
| 157 | + | |
| 158 | + }, | |
| 159 | + | |
| 160 | + /** | |
| 161 | + * 生命周期函数--监听页面显示 | |
| 162 | + */ | |
| 163 | + onShow() { | |
| 164 | + this.loadMore() | |
| 165 | + | |
| 166 | + }, | |
| 167 | + | |
| 168 | + /** | |
| 169 | + * 生命周期函数--监听页面隐藏 | |
| 170 | + */ | |
| 171 | + onHide() { | |
| 172 | + | |
| 173 | + }, | |
| 174 | + | |
| 175 | + /** | |
| 176 | + * 生命周期函数--监听页面卸载 | |
| 177 | + */ | |
| 178 | + onUnload() { | |
| 179 | + | |
| 180 | + }, | |
| 181 | + | |
| 182 | + /** | |
| 183 | + * 页面相关事件处理函数--监听用户下拉动作 | |
| 184 | + */ | |
| 185 | + onPullDownRefresh() { | |
| 186 | + | |
| 187 | + }, | |
| 188 | + | |
| 189 | + /** | |
| 190 | + * 页面上拉触底事件的处理函数 | |
| 191 | + */ | |
| 192 | + onReachBottom() { | |
| 193 | + | |
| 194 | + }, | |
| 195 | + | |
| 196 | + /** | |
| 197 | + * 用户点击右上角分享 | |
| 198 | + */ | |
| 199 | + onShareAppMessage() { | |
| 200 | + | |
| 201 | + } | |
| 202 | +}) |
littleApp_child/packageA/pages/feedbacklist/feedbacklist.json
View file @
623ae70
littleApp_child/packageA/pages/feedbacklist/feedbacklist.wxml
View file @
623ae70
| 1 | +<!--packageA/pages/feedbacklist/feedbacklist.wxml--> | |
| 2 | + | |
| 3 | + | |
| 4 | +<scroll-view scroll-y="true" bindscrolltolower="loadMore" style="height: 100vh;"> | |
| 5 | + <view class="messageNotification"> | |
| 6 | + <!-- --> | |
| 7 | + <!-- --> | |
| 8 | + | |
| 9 | + <view bind:tap="messageBtn" data-item="{{item}}" data-index="{{item.id}}" wx:for="{{notificationList}}" wx:for-item="item" | |
| 10 | + wx:for-index="index" | |
| 11 | + wx:key="index" class="messageNotification-item" | |
| 12 | + > | |
| 13 | + <view class="head"> | |
| 14 | + <view class="notice"> | |
| 15 | + <view class="notice-title tile-color" wx:if="{{true}}">{{item.callBack?'已回复':'未回复'}}</view> | |
| 16 | + <text class="text"></text> | |
| 17 | + </view> | |
| 18 | + <view class="time"> | |
| 19 | + {{item.createdstr}} | |
| 20 | + </view> | |
| 21 | + </view> | |
| 22 | + <view class="content"> | |
| 23 | + <view class="title-head" style="display: flex; justify-content: space-between; align-items: center;"> | |
| 24 | + <view> | |
| 25 | + <text>{{item.title}}</text> | |
| 26 | + </view> | |
| 27 | + </view> | |
| 28 | + <view class="title-content"> | |
| 29 | + {{item.content}} | |
| 30 | + </view> | |
| 31 | + </view> | |
| 32 | + </view> | |
| 33 | +</view> | |
| 34 | + | |
| 35 | +</scroll-view> |
littleApp_child/packageA/pages/feedbacklist/feedbacklist.wxss
View file @
623ae70
| 1 | +/* packageA/pages/feedbacklist/feedbacklist.wxss */ | |
| 2 | + | |
| 3 | +.messageNotification { | |
| 4 | + width: 100vw; | |
| 5 | + height: 100vh; | |
| 6 | + background-color: #F2F2F2; | |
| 7 | + } | |
| 8 | + | |
| 9 | + .messageNotification .messageNotification-item{ | |
| 10 | + width: 690rpx; | |
| 11 | + margin: 28rpx 30rpx; | |
| 12 | + background: #FFFFFF; | |
| 13 | + border-radius: 6rpx 6rpx 6rpx 6rpx; | |
| 14 | + } | |
| 15 | + | |
| 16 | + .messageNotification-item .head{ | |
| 17 | + height: 100rpx; | |
| 18 | + display: flex; | |
| 19 | + align-items: center; | |
| 20 | + justify-content: space-between; | |
| 21 | + border-bottom: 2rpx solid #F4F4F4; | |
| 22 | + padding: 0 36rpx; | |
| 23 | + } | |
| 24 | + | |
| 25 | + .head .time{ | |
| 26 | + font-family: SourceHanSansSC, SourceHanSansSC; | |
| 27 | + font-weight: 400; | |
| 28 | + font-size: 22rpx; | |
| 29 | + color: #636363; | |
| 30 | + line-height: 0rpx; | |
| 31 | + text-align: left; | |
| 32 | + font-style: normal; | |
| 33 | + text-transform: none; | |
| 34 | + } | |
| 35 | + | |
| 36 | + .messageNotification-item .notice{ | |
| 37 | + position: relative; | |
| 38 | + } | |
| 39 | + | |
| 40 | + .notice .text { | |
| 41 | + position: absolute; | |
| 42 | + top: 10rpx; | |
| 43 | + left: -20rpx; | |
| 44 | + width: 10rpx; | |
| 45 | + height: 10rpx; | |
| 46 | + background: #FF2727; | |
| 47 | + border-radius: 5rpx 5rpx 5rpx 5rpx | |
| 48 | + } | |
| 49 | + | |
| 50 | + .notice .notice-title { | |
| 51 | + font-family: SourceHanSansSC, SourceHanSansSC; | |
| 52 | + font-weight: 400; | |
| 53 | + font-size: 22rpx; | |
| 54 | + color: #FFFFFF; | |
| 55 | + width: 72rpx; | |
| 56 | + height: 31rpx; | |
| 57 | + line-height: 31rpx; | |
| 58 | + text-align: center; | |
| 59 | + } | |
| 60 | + .notice .tile-color{ | |
| 61 | + background: #FF6D89; | |
| 62 | + border-radius: 3rpx 3rpx 3rpx 3rpx; | |
| 63 | + } | |
| 64 | + .notice .tile-color1 { | |
| 65 | + background: #FD992F; | |
| 66 | + border-radius: 3rpx 3rpx 3rpx 3rpx; | |
| 67 | + } | |
| 68 | + | |
| 69 | + .messageNotification-item .content{ | |
| 70 | + padding: 30rpx; | |
| 71 | + | |
| 72 | + } | |
| 73 | + | |
| 74 | + .content .title-head{ | |
| 75 | + font-family: SourceHanSansSC, SourceHanSansSC; | |
| 76 | + font-weight: 400; | |
| 77 | + font-size: 28rpx; | |
| 78 | + color: #0B0B0B; | |
| 79 | + margin-bottom: 20rpx; | |
| 80 | + font-style: normal; | |
| 81 | + text-transform: none; | |
| 82 | + } | |
| 83 | + .content .title-content{ | |
| 84 | + font-family: SourceHanSansSC, SourceHanSansSC; | |
| 85 | + font-weight: 400; | |
| 86 | + font-size: 24rpx; | |
| 87 | + color: #999999; | |
| 88 | + font-style: normal; | |
| 89 | + text-transform: none; | |
| 90 | + display: -webkit-box; | |
| 91 | + -webkit-line-clamp: 3; /* 设置最大行数 */ | |
| 92 | + -webkit-box-orient: vertical; /* 设置为垂直方向 */ | |
| 93 | + overflow: hidden; /* 超出部分隐藏 */ | |
| 94 | + } |
littleApp_child/packageA/pages/feedbackxq/feedbackxq.js
View file @
623ae70
| 1 | +// packageA/pages/feedbackxq/feedbackxq.js | |
| 2 | +Page({ | |
| 3 | + | |
| 4 | + /** | |
| 5 | + * 页面的初始数据 | |
| 6 | + */ | |
| 7 | + data: { | |
| 8 | + type:'', | |
| 9 | + cTime:'', | |
| 10 | + content:'', | |
| 11 | + dTime:'', | |
| 12 | + dContent:'', | |
| 13 | + hf:1 | |
| 14 | + }, | |
| 15 | + | |
| 16 | + /** | |
| 17 | + * 生命周期函数--监听页面加载 | |
| 18 | + */ | |
| 19 | + onLoad(options) { | |
| 20 | + if(wx.getStorageSync('feedxq')){ | |
| 21 | + let str=JSON.parse(wx.getStorageSync('feedxq')) | |
| 22 | + console.log('str',str); | |
| 23 | + let typestr='' | |
| 24 | + if(str.type==3){ | |
| 25 | + typestr='其他反馈' | |
| 26 | + }else if(str.type==2){ | |
| 27 | + typestr='内容意见' | |
| 28 | + }else{ | |
| 29 | + typestr='无法正常使用' | |
| 30 | + } | |
| 31 | + if(str.callBack){ | |
| 32 | + let Dtime=this.formatDate(str.modified) | |
| 33 | + this.setData({ | |
| 34 | + dContent:str.callBack, | |
| 35 | + dTime:Dtime, | |
| 36 | + hf:1 | |
| 37 | + }) | |
| 38 | + }else{ | |
| 39 | + this.setData({ | |
| 40 | + hf:0 | |
| 41 | + }) | |
| 42 | + } | |
| 43 | + let Ctime=this.formatDate(str.created) | |
| 44 | + this.setData({ | |
| 45 | + content:str.content, | |
| 46 | + type:typestr, | |
| 47 | + cTime:Ctime | |
| 48 | + }) | |
| 49 | + } | |
| 50 | + }, | |
| 51 | + formatDate(milliseconds) { | |
| 52 | + // 创建 Date 对象 | |
| 53 | + const date = new Date(milliseconds); | |
| 54 | + | |
| 55 | + // 格式化日期和时间 | |
| 56 | + const year = date.getFullYear(); | |
| 57 | + const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份是从0开始的 | |
| 58 | + const day = String(date.getDate()).padStart(2, '0'); | |
| 59 | + const hours = String(date.getHours()).padStart(2, '0'); | |
| 60 | + const minutes = String(date.getMinutes()).padStart(2, '0'); | |
| 61 | + const seconds = String(date.getSeconds()).padStart(2, '0'); | |
| 62 | + | |
| 63 | + // 拼接成 YYYY-MM-DD HH:MM:SS 格式 | |
| 64 | + return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; | |
| 65 | + } , | |
| 66 | + /** | |
| 67 | + * 生命周期函数--监听页面初次渲染完成 | |
| 68 | + */ | |
| 69 | + onReady() { | |
| 70 | + | |
| 71 | + }, | |
| 72 | + | |
| 73 | + /** | |
| 74 | + * 生命周期函数--监听页面显示 | |
| 75 | + */ | |
| 76 | + onShow() { | |
| 77 | + | |
| 78 | + }, | |
| 79 | + | |
| 80 | + /** | |
| 81 | + * 生命周期函数--监听页面隐藏 | |
| 82 | + */ | |
| 83 | + onHide() { | |
| 84 | + | |
| 85 | + }, | |
| 86 | + | |
| 87 | + /** | |
| 88 | + * 生命周期函数--监听页面卸载 | |
| 89 | + */ | |
| 90 | + onUnload() { | |
| 91 | + | |
| 92 | + }, | |
| 93 | + | |
| 94 | + /** | |
| 95 | + * 页面相关事件处理函数--监听用户下拉动作 | |
| 96 | + */ | |
| 97 | + onPullDownRefresh() { | |
| 98 | + | |
| 99 | + }, | |
| 100 | + | |
| 101 | + /** | |
| 102 | + * 页面上拉触底事件的处理函数 | |
| 103 | + */ | |
| 104 | + onReachBottom() { | |
| 105 | + | |
| 106 | + }, | |
| 107 | + | |
| 108 | + /** | |
| 109 | + * 用户点击右上角分享 | |
| 110 | + */ | |
| 111 | + onShareAppMessage() { | |
| 112 | + | |
| 113 | + } | |
| 114 | +}) |
littleApp_child/packageA/pages/feedbackxq/feedbackxq.json
View file @
623ae70
littleApp_child/packageA/pages/feedbackxq/feedbackxq.wxml
View file @
623ae70
| 1 | +<!--packageA/pages/feedbackxq/feedbackxq.wxml--> | |
| 2 | +<view style="padding: 20rpx;font-size: 24rpx;box-sizing: border-box;background-color: #fff;"> | |
| 3 | + <view class="box1"> | |
| 4 | + <view class="flex1"> | |
| 5 | + <view class="left">反馈类型:{{type}}</view> | |
| 6 | + <view class="right">反馈时间:{{cTime}}</view> | |
| 7 | + </view> | |
| 8 | + <view> | |
| 9 | + {{content}} | |
| 10 | + </view> | |
| 11 | + </view> | |
| 12 | + <view class="box2"> | |
| 13 | + <view class="flex1"> | |
| 14 | + <view class="left">医生回复:</view> | |
| 15 | + <view class="right">{{dTime}}</view> | |
| 16 | + </view> | |
| 17 | + <view> | |
| 18 | + {{hf==1?dContent:'暂无回复'}} | |
| 19 | + </view> | |
| 20 | + </view> | |
| 21 | +</view> |
littleApp_child/packageA/pages/feedbackxq/feedbackxq.wxss
View file @
623ae70
| 1 | +/* packageA/pages/feedbackxq/feedbackxq.wxss */ | |
| 2 | +.box1{ | |
| 3 | + background-color: #fff; | |
| 4 | + min-height: 100rpx; | |
| 5 | + border: 1px solid #ccc; | |
| 6 | + border-radius: 10rpx; | |
| 7 | + padding: 10rpx; | |
| 8 | +} | |
| 9 | +.box2{ | |
| 10 | + background-color: #fff; | |
| 11 | + min-height: 100rpx; | |
| 12 | + border: 1px solid #ccc; | |
| 13 | + border-radius: 10rpx; | |
| 14 | + padding: 10rpx; | |
| 15 | + margin-top: 20rpx; | |
| 16 | +} | |
| 17 | +.flex1{ | |
| 18 | + display: flex; | |
| 19 | + justify-content: space-between; | |
| 20 | +} |
littleApp_child/pages/Setting/Setting.js
View file @
623ae70
| ... | ... | @@ -17,7 +17,9 @@ |
| 17 | 17 | isShowTwo: false, |
| 18 | 18 | isShowThree: false, |
| 19 | 19 | isVip:false, |
| 20 | - userData:'' | |
| 20 | + userData:'', | |
| 21 | + babyname:'', | |
| 22 | + babyid:'' | |
| 21 | 23 | }, |
| 22 | 24 | onLoad: function (option) { |
| 23 | 25 | |
| ... | ... | @@ -45,7 +47,10 @@ |
| 45 | 47 | } |
| 46 | 48 | networkUtil._get(api.userInfo + app.globalData.currentId, param, function (res) { |
| 47 | 49 | console.log('获取用户信息', res) |
| 48 | - | |
| 50 | + self.setData({ | |
| 51 | + babyname:res.data.data.username, | |
| 52 | + babyid:res.data.data.id | |
| 53 | + }) | |
| 49 | 54 | self.setUserInfo(res.data.data) |
| 50 | 55 | |
| 51 | 56 | }, function (res) { |
| 52 | 57 | |
| ... | ... | @@ -99,25 +104,13 @@ |
| 99 | 104 | url = '../inforBind/inforBind' |
| 100 | 105 | break |
| 101 | 106 | case 1: |
| 102 | - url = '../feedback/feedback' | |
| 107 | + url = `../feedback/feedback?babyname=${this.data.babyname}&babyid=${this.data.babyid}` | |
| 103 | 108 | break |
| 104 | 109 | case 2: |
| 105 | 110 | wx.showToast({ |
| 106 | 111 | title: '清除成功', |
| 107 | 112 | }) |
| 108 | 113 | break |
| 109 | - // case 3: | |
| 110 | - // url = '../PersonalInfo/PersonalInfo' | |
| 111 | - // break | |
| 112 | - // case 4: | |
| 113 | - // url = '../mySaved/mySaved' | |
| 114 | - // break | |
| 115 | - // case 5: | |
| 116 | - // url = '../feedback/feedback' | |
| 117 | - // break | |
| 118 | - // case 6: | |
| 119 | - | |
| 120 | - // break | |
| 121 | 114 | } |
| 122 | 115 | wx.navigateTo({ |
| 123 | 116 | url: url |
littleApp_child/pages/feedback/feedback.js
View file @
623ae70
| ... | ... | @@ -3,7 +3,7 @@ |
| 3 | 3 | // 网络请求工具类 |
| 4 | 4 | var networkUtil = require('../../utils/network_util.js') |
| 5 | 5 | var api = require('../../utils/apiFile.js') |
| 6 | - | |
| 6 | +var app = getApp() | |
| 7 | 7 | // 页码 |
| 8 | 8 | var page = 0 |
| 9 | 9 | // 地理位置信息 |
| 10 | 10 | |
| ... | ... | @@ -17,10 +17,16 @@ |
| 17 | 17 | chooseOne: 0, |
| 18 | 18 | chooseTwo: 0, |
| 19 | 19 | chooseThree: 0, |
| 20 | - content: "" | |
| 21 | - | |
| 20 | + content: "", | |
| 21 | + babyname:'', | |
| 22 | + babyid:'' | |
| 22 | 23 | }, |
| 23 | 24 | onLoad: function (e) { |
| 25 | + console.log('撒大大',e); | |
| 26 | + this.setData({ | |
| 27 | + babyname:e.babyname, | |
| 28 | + babyid:e.babyid | |
| 29 | + }) | |
| 24 | 30 | wx.getSystemInfo({ |
| 25 | 31 | success: function (res) { |
| 26 | 32 | console.log(res) |
| 27 | 33 | |
| ... | ... | @@ -81,10 +87,43 @@ |
| 81 | 87 | networkUtil.showErrorToast('选择反馈类型') |
| 82 | 88 | return |
| 83 | 89 | } |
| 84 | - console.log(this.data.content) | |
| 85 | - networkUtil.showErrorToast('提交成功') | |
| 86 | - wx.navigateBack({ | |
| 90 | + let type | |
| 91 | + if(this.data.chooseOne==1){ | |
| 92 | + type=1 | |
| 93 | + }else if(this.data.chooseTwo==1){ | |
| 94 | + type=2 | |
| 95 | + }else{ | |
| 96 | + type=3 | |
| 97 | + } | |
| 98 | + let params={ | |
| 99 | + content:this.data.content, | |
| 100 | + publishId:this.data.babyid, | |
| 101 | + publishName:this.data.babyname, | |
| 102 | + type:type, | |
| 103 | + hospitalId:app.globalData.userInfo.hospitalId | |
| 104 | + } | |
| 105 | + networkUtil._post(api.addfeedback, params, function (res) { | |
| 106 | + if(res.data.errorcode==0){ | |
| 107 | + networkUtil.showErrorToast('提交成功') | |
| 108 | + console.log('res',res); | |
| 109 | + } | |
| 110 | + }, function (res) { | |
| 111 | + networkUtil.showErrorToast(res.errormsg) | |
| 112 | + },'application/json') | |
| 113 | + }, | |
| 114 | + submit1:function(){ | |
| 115 | + wx.navigateTo({ | |
| 116 | + url: `/packageA/pages/feedbacklist/feedbacklist?id=${this.data.babyid}` | |
| 87 | 117 | }) |
| 118 | + // networkUtil._get(api.getfeedback, { | |
| 119 | + // page:1, | |
| 120 | + // limit:10, | |
| 121 | + // babyId:this.data.babyid | |
| 122 | + // }, function(res) { | |
| 123 | + | |
| 124 | + // }, function(res) { | |
| 125 | + // networkUtil.showErrorToast(res.errormsg) | |
| 126 | + // }) | |
| 88 | 127 | } |
| 89 | 128 | }) |
littleApp_child/pages/feedback/feedback.wxml
View file @
623ae70
littleApp_child/pages/feedback/feedback.wxss
View file @
623ae70
littleApp_child/pages/home/home.wxml
View file @
623ae70
| ... | ... | @@ -121,11 +121,11 @@ |
| 121 | 121 | <image src="../../source/jianchajilu.png" style="{{item_small}}" class="foundation_item_small_image"></image> |
| 122 | 122 | <view class="foundation_item_small_text">补填户籍地址</view> |
| 123 | 123 | </navigator> |
| 124 | - <navigator class="foundation_item_small" bind:tap="goArticle" wx:if="{{yc==1}}"> | |
| 124 | + <navigator class="foundation_item_small" bind:tap="goArticle" wx:if="{{userData.hospitalId !== 666668}}"> | |
| 125 | 125 | <image src="../../source/jianchajilu.png" style="{{item_small}}" class="foundation_item_small_image"></image> |
| 126 | 126 | <view class="foundation_item_small_text">中医指导文章</view> |
| 127 | 127 | </navigator> |
| 128 | - <navigator wx:if="{{userData.hospitalId !== 666668}}" class="foundation_item_small" bind:tap="goServiceNotice"> | |
| 128 | + <navigator class="foundation_item_small" bind:tap="goServiceNotice"> | |
| 129 | 129 | <image src="../../source/jianchajilu.png" style="{{item_small}}" class="foundation_item_small_image"></image> |
| 130 | 130 | <view class="foundation_item_small_text">服务名目通知</view> |
| 131 | 131 | </navigator> |
littleApp_child/utils/apiFile.js
View file @
623ae70
| ... | ... | @@ -120,6 +120,10 @@ |
| 120 | 120 | // 通知详情 |
| 121 | 121 | getBabyMsgById :'getBabyMsgById', |
| 122 | 122 | // 消息记录 |
| 123 | - getBabyMsgCountById:'getBabyMsgCountById' | |
| 123 | + getBabyMsgCountById:'getBabyMsgCountById', | |
| 124 | + //提交反馈 | |
| 125 | + addfeedback:'baby/feedback/add', | |
| 126 | + //反馈列表 | |
| 127 | + getfeedback:'baby/feedback/getList' | |
| 124 | 128 | } |