From 35cd1fc2e97ee8c8ec93d632cfc6b8b90e7a6e2b Mon Sep 17 00:00:00 2001 From: zuoxiao <470321431@qq.com> Date: 星期五, 18 十月 2024 17:18:31 +0800 Subject: [PATCH] 1.首页添加横滑删除功能2.同步最新代码 --- pages/feedback/feedback.js | 424 +++++++++++++++--------- pages/home/home.js | 39 + pages/home/home.json | 3 pages/rechargeCard/rechargeCard.js | 183 +++++++--- pages/valveList/valveList.wxml | 6 images/delete.svg | 1 images/question.svg | 2 pages/feedback/feedback.wxml | 87 +++- pages/feedback/feedback.wxss | 121 ++++++ pages/rechargeCard/rechargeCard.wxml | 2 app.json | 3 app.js | 6 api/config.js | 3 pages/valveList/valveList.js | 26 + pages/openCard/openCard.js | 30 + pages/openCard/openCard.wxss | 5 pages/openCard/openCard.wxml | 4 pages/waterIntake/waterIntake.wxss | 2 pages/waterIntake/waterIntake.js | 5 pages/home/home.wxml | 14 pages/home/home.wxss | 51 ++ 21 files changed, 702 insertions(+), 315 deletions(-) diff --git a/api/config.js b/api/config.js index 57a771d..ed78f00 100644 --- a/api/config.js +++ b/api/config.js @@ -8,7 +8,8 @@ case 'test': // BASEURL = 'https://irrigate.dayuyanjiuyuan.top/' // BASEURL = 'https://d4x9787456.vicp.fun/' - BASEURL = 'http://127.0.0.1:8087/' + // BASEURL = 'http://127.0.0.1:8087/' + BASEURL = 'http://192.168.40.166:8087/' break default: BASEURL = '' diff --git a/app.js b/app.js index 7c218ae..575689c 100644 --- a/app.js +++ b/app.js @@ -14,9 +14,9 @@ }) }, globalData: { - sessionId:'2024071616542300009', - clientId:'2024062716083600006', - tag:'test', + sessionId:'2024052821300200006', + clientId:'2024091215314000006', + tag:'ym', userInfo: null, userId:"", userCode:"", diff --git a/app.json b/app.json index 03e8743..b8a7a94 100644 --- a/app.json +++ b/app.json @@ -23,8 +23,7 @@ "navigationBarBackgroundColor": "#1890FF" }, "componentFramework": "glass-easel", - "sitemapLocation": "sitemap.json", - "lazyCodeLoading": "requiredComponents" + "sitemapLocation": "sitemap.json" } \ No newline at end of file diff --git a/images/delete.svg b/images/delete.svg new file mode 100644 index 0000000..cab2b76 --- /dev/null +++ b/images/delete.svg @@ -0,0 +1 @@ +<?xml version="1.0" encoding="UTF-8"?><svg width="24" height="24" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="24" cy="24" r="20" fill="none" stroke="#1890FF" stroke-width="4"/><path d="M17 31L31 17" stroke="#1890FF" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M19 19L17 17" stroke="#1890FF" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M31 31L29 29" stroke="#1890FF" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></svg> \ No newline at end of file diff --git a/images/question.svg b/images/question.svg index 5567cad..1e55913 100644 --- a/images/question.svg +++ b/images/question.svg @@ -1 +1 @@ -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="70.80000305175781" height="75.00926971435547" viewBox="0 0 70.80000305175781 75.00926971435547"><g><path d="M32.3,0.00927001C34.05,0.00927001,35.4,1.40927,35.4,3.10927C35.4,4.80927,34,6.20927,32.3,6.20927L12.15,6.20927C8.85,6.40927,6.25,9.15927,6.25,12.4593L6.25,62.8093C6.45,66.1093,9.2,68.7093,12.5,68.7093L58.7,68.7093C62,68.5093,64.6,65.7593,64.6,62.4593L64.6,28.1093C64.6,26.3593,66,25.0093,67.7,25.0093C69.45,25.0093,70.8,26.4093,70.8,28.1093L70.8,62.5093C70.8,69.4093,65.2,75.0093,58.3,75.0093L12.5,75.0093C5.6,75.0093,0,69.4093,0,62.5093L0,12.5093C0,5.60927,5.6,0.00927001,12.5,0.00927001L32.3,0.00927001ZM42.7,52.1093C44.45,52.1093,45.8,53.5093,45.8,55.2093C45.8,56.9593,44.4,58.3093,42.7,58.3093L19.8,58.3093C18.05,58.3093,16.7,56.9093,16.7,55.2093C16.7,53.4593,18.1,52.1093,19.8,52.1093L42.7,52.1093ZM30.2,37.5093C31.95,37.5093,33.3,38.9093,33.3,40.6093C33.3,42.3093,31.9,43.7093,30.2,43.7093L19.8,43.7093C18.05,43.7093,16.7,42.3093,16.7,40.6093C16.7,38.9093,18.1,37.5093,19.8,37.5093L30.2,37.5093ZM51.45,6.30927L61.75,12.1593L49.9,32.4593L43.2,35.2593C42.2,35.7093,41.05,35.2093,40.6,34.2093C40.55,34.0593,40.5,33.8593,40.45,33.6593L39.6,26.5593L51.45,6.30927ZM61.6,0.809269C64.4,2.35927,65.4,5.90927,63.85,8.70927C63.85,8.75927,63.8,8.75927,63.8,8.80927L62.8,10.5093L52.5,4.65927L53.5,2.95927C55.1,0.109269,58.75,-0.840731,61.6,0.809269Z" fill="#4090FF" fill-opacity="1"/></g></svg> \ No newline at end of file +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="60.80000305175781" height="65.00926971435547" viewBox="0 0 70.80000305175781 75.00926971435547"><g><path d="M32.3,0.00927001C34.05,0.00927001,35.4,1.40927,35.4,3.10927C35.4,4.80927,34,6.20927,32.3,6.20927L12.15,6.20927C8.85,6.40927,6.25,9.15927,6.25,12.4593L6.25,62.8093C6.45,66.1093,9.2,68.7093,12.5,68.7093L58.7,68.7093C62,68.5093,64.6,65.7593,64.6,62.4593L64.6,28.1093C64.6,26.3593,66,25.0093,67.7,25.0093C69.45,25.0093,70.8,26.4093,70.8,28.1093L70.8,62.5093C70.8,69.4093,65.2,75.0093,58.3,75.0093L12.5,75.0093C5.6,75.0093,0,69.4093,0,62.5093L0,12.5093C0,5.60927,5.6,0.00927001,12.5,0.00927001L32.3,0.00927001ZM42.7,52.1093C44.45,52.1093,45.8,53.5093,45.8,55.2093C45.8,56.9593,44.4,58.3093,42.7,58.3093L19.8,58.3093C18.05,58.3093,16.7,56.9093,16.7,55.2093C16.7,53.4593,18.1,52.1093,19.8,52.1093L42.7,52.1093ZM30.2,37.5093C31.95,37.5093,33.3,38.9093,33.3,40.6093C33.3,42.3093,31.9,43.7093,30.2,43.7093L19.8,43.7093C18.05,43.7093,16.7,42.3093,16.7,40.6093C16.7,38.9093,18.1,37.5093,19.8,37.5093L30.2,37.5093ZM51.45,6.30927L61.75,12.1593L49.9,32.4593L43.2,35.2593C42.2,35.7093,41.05,35.2093,40.6,34.2093C40.55,34.0593,40.5,33.8593,40.45,33.6593L39.6,26.5593L51.45,6.30927ZM61.6,0.809269C64.4,2.35927,65.4,5.90927,63.85,8.70927C63.85,8.75927,63.8,8.75927,63.8,8.80927L62.8,10.5093L52.5,4.65927L53.5,2.95927C55.1,0.109269,58.75,-0.840731,61.6,0.809269Z" fill="#4090FF" fill-opacity="1"/></g></svg> \ No newline at end of file diff --git a/pages/feedback/feedback.js b/pages/feedback/feedback.js index 7887046..d98f891 100644 --- a/pages/feedback/feedback.js +++ b/pages/feedback/feedback.js @@ -1,55 +1,130 @@ +const audio = wx.createInnerAudioContext() +const recorderManager = wx.getRecorderManager() Page({ data: { + isRefreshing: false, + currentTab: 0, recordingSrc: '', isRecording: false, - isshowVoiceMask: true, //鏄惁鏄剧ず褰曢煶涓� - voiceTime: 2, //褰曢煶鏃堕暱 + isshowVoiceMask: false, //鏄惁鏄剧ず褰曢煶涓� + isShowVoiceView: false, + voiceTime: 0, //褰曢煶鏃堕暱 + maxVoiceTime: 60, //鏈�闀垮綍闊虫椂闂� + contDownTime: 0, + line2Opcity: 1, + line3Opcity: 1, gridConfig: { column: 3, width: 160, height: 160, }, - originFiles: [{ - url: 'https://tdesign.gtimg.com/mobile/demos/example4.png', - name: 'uploaded1.png', - type: 'image', - }, - { - url: 'https://tdesign.gtimg.com/mobile/demos/example6.png', - name: 'uploaded2.png', - type: 'image', - } - ] + originFiles: [ + ], + feedBackList: Array(19).fill({ + createTime: "2023-05-06 12:36:25", + responseTime: "2023-05-07 12:36:25" + }), + contentValue:''//鍙嶉璇︽儏 }, onLoad() { - this.recorderManager = wx.getRecorderManager(); - this.recorderManager.onStart(() => { - console.log('recorder start'); - this.setData({ - isRecording: true - }); - this.startWaveformDrawing(); + wx.getSetting({ + success: (res) => { + if (!res.authSetting['scope.record']) { + // 濡傛灉鐢ㄦ埛娌℃湁鎺堟潈褰曢煶鏉冮檺锛屽彂璧锋巿鏉冪獥鍙� + wx.authorize({ + scope: 'scope.record', + success() { + // 鐢ㄦ埛宸茬粡鍚屾剰灏忕▼搴忎娇鐢ㄥ綍闊冲姛鑳斤紝鍙互缁х画鎿嶄綔 + console.log('鐢ㄦ埛宸叉巿鏉冨綍闊�'); + }, + fail() { + // 鐢ㄦ埛鎷掔粷鎺堟潈锛屽彲浠ョ粰鍑烘彁绀烘垨鍐嶆鍙戣捣鎺堟潈绐楀彛 + console.log('鐢ㄦ埛鎷掔粷浜嗘巿鏉冨綍闊�'); + } + }); + } else { + // 鐢ㄦ埛宸茬粡鎺堟潈褰曢煶锛屽彲浠ョ洿鎺ヨ繘琛屽綍闊虫搷浣� + console.log('鐢ㄦ埛宸叉巿鏉冨綍闊�'); + } + } }); + var that = this; + recorderManager.onStop((res) => { + console.log('褰曢煶鍋滄', voiceTime); + const voiceTime = Math.floor(res.duration / 1000) + if (voiceTime < 2) { + this.setData({ + isShowVoiceMask: false, + contDownTime: this.data.maxVoiceTime, + isShowVoiceView: false + }) + wx.showToast({ + title: '褰曢煶鏃堕棿杩囩煭', + icon: 'error', + time: 3000 + }) + } else { + + that.setData({ + voiceTime: voiceTime, + isShowVoiceMask: false, + contDownTime: this.data.maxVoiceTime, + isShowVoiceView: true + }) + console.log('res', res); + const { + tempFilePath + } = res; //杩欓噷鏉惧紑鎸夐挳 浼氳繑鍥炲綍闊虫湰鍦拌矾寰� + audio.src = tempFilePath + console.log(tempFilePath); + } - this.recorderManager.onStop((res) => { - console.log('recorder stop', res); - const { - tempFilePath - } = res; - this.setData({ - recordingSrc: tempFilePath, - isRecording: false - }); - this.stopWaveformDrawing(); + //涓婁紶褰曞埗鐨勯煶棰戝埌鏈嶅姟鍣� + // wx.uploadFile({ + // url: '鎺ュ彛鍦板潃' + api.voice, //鎺ュ彛鍦板潃 + // name: 'file', //涓婁紶鏂囦欢鍚� + // filePath: tempFilePath, + // success: function (res) { //鍚庡彴杩斿洖缁欏墠绔瘑鍒悗鐨勬枃瀛� + // var model = res.data + // var modeljson = JSON.parse(model) + // if (modeljson.status_code == 500) { + // wx.showToast({ + // title: '璇煶杞崲澶辫触', + // image: '/assets/image/icon/fail@2x.png' + // }) + // return false; + // } + // if (modeljson.meta.status_code === 200 && !modeljson.data.err_msg) { + // var saymessage = modeljson.data.message; + // wx.setStorageSync('sayinfo', saymessage) + // that.setData({ + // inpvalue: saymessage + // }) + // setTimeout(() =>{ + // wx.navigateTo({ + // url: '../loding/loding' + // }) + + // },2000) + // setTimeout(() => { + // wx.hideLoading(); + // }, 100) + // } else if (modeljson.data.err_msg) { + // wx.showToast({ + // title: '璇峰ぇ澹拌璇�', + // image: '/assets/image/icon/fail@2x.png' + // }) + // return false; + // } + // } + // }) }); - - this.recorderManager.onError((res) => { - console.error(res); - this.setData({ - isRecording: false - }); - this.stopWaveformDrawing(); + recorderManager.onStart(() => { + console.log('褰曢煶寮�濮�'); + }); + recorderManager.onError((err) => { + console.log('褰曢煶閿欒', err); }); }, handleRemove(e) { @@ -99,136 +174,177 @@ }); }, //鎸変綇鎸夐挳 - startHandel () { + startHandel() { this.setData({ - isShowVoiceMask:true + isShowVoiceMask: true, + contDownTime: this.data.maxVoiceTime, + voiceTime: 0, + isShowVoiceView: false }) console.log("寮�濮嬪綍闊�") - wx.getRecorderManager().start({ - duration: 0 + recorderManager.start({ + duration: 0 }) - }, - //鏉惧紑鎸夐挳 - endHandle () { - this.setData({ - isShowVoiceMask:false - }) + this.startRecordingCountdown(); + }, + //鏉惧紑鎸夐挳 + endHandle() { + this.stopRecordingCountdown(); console.log("缁撴潫") - const recorderManager = wx.getRecorderManager() - //褰曢煶鍋滄鍑芥暟 - var that = this; - wx.getRecorderManager().onStop((res) => { - const voiceTime = Math.floor(res.duration/1000) - console.log('voiceTime',voiceTime); - that.setData({ - voiceTime - }) - console.log('res',res); - const { tempFilePath } = res; //杩欓噷鏉惧紑鎸夐挳 浼氳繑鍥炲綍闊虫湰鍦拌矾寰� - audio.src = tempFilePath - console.log(tempFilePath); - //涓婁紶褰曞埗鐨勯煶棰戝埌鏈嶅姟鍣� - // wx.uploadFile({ - // url: '鎺ュ彛鍦板潃' + api.voice, //鎺ュ彛鍦板潃 - // name: 'file', //涓婁紶鏂囦欢鍚� - // filePath: tempFilePath, - // success: function (res) { //鍚庡彴杩斿洖缁欏墠绔瘑鍒悗鐨勬枃瀛� - // var model = res.data - // var modeljson = JSON.parse(model) - // if (modeljson.status_code == 500) { - // wx.showToast({ - // title: '璇煶杞崲澶辫触', - // image: '/assets/image/icon/fail@2x.png' - // }) - // return false; - // } - // if (modeljson.meta.status_code === 200 && !modeljson.data.err_msg) { - // var saymessage = modeljson.data.message; - // wx.setStorageSync('sayinfo', saymessage) - // that.setData({ - // inpvalue: saymessage - // }) - // setTimeout(() =>{ - // wx.navigateTo({ - // url: '../loding/loding' - // }) - - // },2000) - // setTimeout(() => { - // wx.hideLoading(); - // }, 100) - // } else if (modeljson.data.err_msg) { - // wx.showToast({ - // title: '璇峰ぇ澹拌璇�', - // image: '/assets/image/icon/fail@2x.png' - // }) - // return false; - // } - // } - // }) - }) //瑙﹀彂褰曢煶鍋滄 - wx.getRecorderManager().stop() - }, -// 鎾斁 -handlePlay(e){ - // 鍊掕鏃� - let time = this.data.voiceTime - audio.play() - let timer1 = -1,timer2 = -1,timer3 = -1,timer4 = -1,timer5 = -1,timer6 = -1; - // 绗竴娆℃挱鏀句负0 绗簩娆℃挱鏀�2绉掗挓 - timer6 = setInterval(()=>{ - console.log('鏃堕棿',time); - if(time <= 0){ - this.setData({ - line2Opcity: 1, - line3Opcity: 1 - }) - clearInterval(timer6) - clearTimeout(timer2) - clearTimeout(timer3) - clearTimeout(timer4) - clearTimeout(timer5) - return - } - timer2 = setTimeout(()=>{ - console.log('timer2'); - this.setData({ - line2Opcity: 0, - line3Opcity: 0 - }) - },300) - timer3 = setTimeout(()=>{ - console.log('timer3'); - this.setData({ - line2Opcity: 1, - line3Opcity:0 - }) - },600) - timer4 = setTimeout(()=>{ - console.log('timer4'); + recorderManager.stop() + }, + // 鎾斁 + handlePlay(e) { + // 鍊掕鏃� + let time = this.data.voiceTime + audio.play() + let timer1 = -1, + timer2 = -1, + timer3 = -1, + timer4 = -1, + timer5 = -1, + timer6 = -1; + // 绗竴娆℃挱鏀句负0 绗簩娆℃挱鏀�2绉掗挓 + timer6 = setInterval(() => { + console.log('鏃堕棿', time); + if (time <= 0) { this.setData({ line2Opcity: 1, line3Opcity: 1 - }) - },900) - timer5 = setTimeout(()=>{ - console.log('timer5'); + }) + clearInterval(timer6) + clearTimeout(timer2) + clearTimeout(timer3) + clearTimeout(timer4) + clearTimeout(timer5) + return + } + timer2 = setTimeout(() => { + console.log('timer2'); this.setData({ line2Opcity: 0, line3Opcity: 0 }) - },1200) - },1200) - // 鍊掕鏃� - timer1 = setInterval(()=>{ - time--; - if(time <= 0){ - clearInterval(timer1) - return - } -},1000) + }, 200) + timer3 = setTimeout(() => { + console.log('timer3'); + this.setData({ + line2Opcity: 1, + line3Opcity: 0 + }) + }, 400) + timer4 = setTimeout(() => { + console.log('timer4'); + this.setData({ + line2Opcity: 1, + line3Opcity: 1 + }) + }, 600) + timer5 = setTimeout(() => { + console.log('timer5'); + this.setData({ + line2Opcity: 0, + line3Opcity: 0 + }) + }, 800) + }, 800) + // 鍊掕鏃� + timer1 = setInterval(() => { + time--; + if (time <= 0) { + clearInterval(timer1) + return + } + }, 1000) -} + }, + //寮�鍚畾鏃跺櫒 + startRecordingCountdown() { + console.log("startRecordingCountdown"); + const that = this; + this.recordingInterval = setInterval(() => { + const newVoiceTime = that.data.voiceTime + 1; + const newContDownTime = that.data.contDownTime - 1; + that.setData({ + voiceTime: newVoiceTime, + contDownTime: newContDownTime + }); + if (this.data.voiceTime >= this.data.maxVoiceTime) { + that.stopRecordingCountdown(); + that.endHandle(); + } + }, 1000); + }, + + stopRecordingCountdown() { + console.log("stopRecordingCountdown"); + if (this.recordingInterval) { + clearInterval(this.recordingInterval); + this.recordingInterval = null; + console.log("Recording countdown stopped"); + } + }, // 鍒囨崲 Tabs + switchTab: function (e) { + const tab = parseInt(e.currentTarget.dataset.tab); + this.setData({ + currentTab: tab + }); + }, + onPullDownRefresh() { + this.setData({ + isRefreshing: false + }); + }, + feelBack(){ + wx.showLoading({ + title: '姝e湪鎻愪氦...', // 鍔犺浇鎻愮ず鏂囧瓧 + mask: true // 鏄惁鏄剧ず閫忔槑钂欏眰锛岄槻姝㈣Е鎽哥┛閫忥紝榛樿涓� false + }); + const app = getApp(); + const data = { + content: this.data.contentValue, //鍙栨按鍙D + image: this.data.vcId, //铏氭嫙鍗D + operator: app.globalData.sessionId, //鎿嶄綔鍛� + forceOpen: !!isforce // 浣跨敤閫昏緫闈炴搷浣滅 !! 鏉ョ‘淇� isForce 鏄竷灏斿�� + }; + post({ + url: "operation/feedback/add", + data: data + }).then(response => { + + // 澶勭悊鎴愬姛鍝嶅簲 + console.log('璇锋眰鎴愬姛:', response); + // 鍔犺浇瀹屾垚鍚庨殣钘忓姞杞藉姩鐢� + wx.hideLoading(); + //瀹屾垚鍚庡洖鍒伴椤� + wx.reLaunch({ + url: '/pages/home/home?param=true' // 棣栭〉鐨勮矾寰勶紝鏍规嵁瀹為檯鎯呭喌濉啓 + }); + + }).catch(error => { + // 鍔犺浇瀹屾垚鍚庨殣钘忓姞杞藉姩鐢� + wx.hideLoading(); + // 澶勭悊閿欒鍝嶅簲 + console.error('璇锋眰澶辫触:', error); + // if (error.code === "10005") { + // this.setData({ + // showDialog: false, + // showForceConfirm: true + // }) + // } else { + this.setData({ + showErrorDialog: true, + errorData: error.msg + }) + // } + }); + }, + handleDelete(){ + this.setData({ + isShowVoiceView:false, + voiceTime:0, + }) + } }); \ No newline at end of file diff --git a/pages/feedback/feedback.wxml b/pages/feedback/feedback.wxml index c55587b..0f7ba0d 100644 --- a/pages/feedback/feedback.wxml +++ b/pages/feedback/feedback.wxml @@ -1,30 +1,65 @@ <view class="container"> - - <view class="container-item"> - <text class="fb-text">鍙嶉璇︽儏锛�</text> - <textarea class="input-class" /> - </view> - <view class="divider"></view> - <view class="container-item"> - <text class="img-upload">鍥剧墖锛堟渶澶氫笁寮狅級:</text> - <t-upload style="margin-top: 20rpx;" media-type="{{['image']}}" files="{{originFiles}}" gridConfig="{{gridConfig}}" bind:success="handleSuccess" max="3" bind:add="handleAdd" bind:remove="handleRemove" bind:click="handleClick" bind:sort-end="handleSortEnd" /> - </view> - <view class="divider"></view> - <view class="container-voice"> - <text class="fb-text">褰曢煶锛�</text> - <view class="voice_wrapper"> - <image class="voice_img" bindtouchstart='startHandel' bindtouchend='endHandle' src="/images/tape.svg" mode="" /> - <view class="voice_content" bind:tap="handlePlay" wx:if="{{voiceTime}}"> - <view class="left"> - <view class="line"></view> - <view class="line" style="opacity:{{line2Opcity}}" id="test2"></view> - <view class="line" style="opacity:{{line3Opcity}}" id="test3"></view> - </view> - <view class="right">{{voiceTime}}"</view> - </view> + <!-- 椤堕儴 Tabs --> + <view class="tabs"> + <view class="tab" bindtap="switchTab" data-tab="0" id="tab0"> + 闂鍙嶉 + <view class="indicator" wx:if="{{currentTab === 0}}"></view> + </view> + <view class="tab" bindtap="switchTab" data-tab="1" id="tab1"> + 宸叉彁闂 + <view class="indicator" wx:if="{{currentTab === 1}}"></view> </view> </view> - <!-- 褰曢煶涓� --> - <view wx:if="{{isShowVoiceMask}}" class="voice_starting">褰曢煶涓�</view> - <button class="fb-submit">鎻愪氦</button> + <view class="container-feedBack" wx:if="{{currentTab === 0}}"> + <view class="container-item"> + <text class="fb-text">鍙嶉璇︽儏锛�</text> + <textarea class="input-class" value="{{contentValue}}" /> + </view> + <view class="divider"></view> + <view class="container-item"> + <text class="fb-text">鍥剧墖锛堟渶澶氫笁寮狅級:</text> + <t-upload style="margin-top: 20rpx;" media-type="{{['image']}}" files="{{originFiles}}" gridConfig="{{gridConfig}}" bind:success="handleSuccess" max="3" bind:add="handleAdd" bind:remove="handleRemove" bind:click="handleClick" bind:sort-end="handleSortEnd" /> + </view> + <view class="divider"></view> + <view class="container-voice"> + <text class="fb-text">褰曢煶锛�</text> + <view class="voice_wrapper"> + <image class="voice_img" bindtouchstart='startHandel' bindtouchend='endHandle' src="/images/tape.svg" mode="" /> + + <view class="voice_content" bind:tap="handlePlay" wx:if="{{isShowVoiceView}}"> + <view class="left"> + <view class="line"></view> + <view class="line" style="opacity:{{line2Opcity}}" id="test2"></view> + <view class="line" style="opacity:{{line3Opcity}}" id="test3"></view> + </view> + <view class="right">{{voiceTime}}"</view> + </view> + <view class="voice_delete" bind:tap="handleDelete" wx:if="{{isShowVoiceView}}" ><image src="/images/delete.svg"/></view> + </view> + </view> + <!-- 褰曢煶涓� --> + <view wx:if="{{isShowVoiceMask}}" class="voice_starting">褰曢煶涓瓄{contDownTime}}绉�</view> + <button class="fb-submit">鎻愪氦</button> + </view> + + <scroll-view class="container-scroll" wx:if="{{currentTab === 1}}" scroll-y="true" refresher-enabled="true" refresher-threshold="50" bindrefresherrefresh="onPullDownRefresh" refresher-triggered="{{isRefreshing}}"> + <block wx:for="{{feedBackList}}" wx:key="index"> + <view class="item"> + <view class="item-data"> + <text>鎻愰棶鏃堕棿锛�</text> + <text>{{item.createTime}}</text> + </view> + <view class="item-data"> + <text>鍝嶅簲鏃堕棿锛�</text> + <text>{{item.responseTime}}</text> + </view> + </view> + </block> + <view wx:if="{{feedBackList.length === 0}}" class="noMore-View"> + <image class="noMore-img" src="/images/no_more.svg" /> + <text class="noMore-text">娌℃湁鏁版嵁</text> + </view> + </scroll-view> + + </view> \ No newline at end of file diff --git a/pages/feedback/feedback.wxss b/pages/feedback/feedback.wxss index 6218e0a..10e279e 100644 --- a/pages/feedback/feedback.wxss +++ b/pages/feedback/feedback.wxss @@ -2,15 +2,37 @@ .container { display: flex; flex-direction: column; + width: 100%; height: 100vh; - padding-left: 30rpx; - padding-right: 30rpx; - width: calc(100% - 0rpx); /* 鑰冭檻浜嗗乏鍙宠竟璺濆悗鐨勫疄闄呭搴� */ background-color: #fff; - justify-content: flex-start; + justify-content: center; align-items: center; } + +.container-scroll{ + flex: 1; + overflow-y: auto; + z-index: 0; + display: flex; + flex-direction: column; + padding-bottom: 20rpx; /* 澧炲姞搴曢儴濉厖 */ +} + +.container-feedBack { + width: calc(100% - 80rpx); + /* 40rpx 涓哄乏鍙� padding 鐨勬�诲拰 */ + height: 100vh; + /* 鑰冭檻浜嗗乏鍙宠竟璺濆悗鐨勫疄闄呭搴� */ + background-color: #fff; + padding-left: 40rpx; + padding-right: 40rpx; + padding-top: 1rpx; + padding-bottom: 1rpx; +} + + + .btn { margin: 10px; @@ -43,9 +65,13 @@ .input-class { border-radius: 5px; border: 2rpx solid #000000; - height: 20vh; + height: 10vh; width: 100%; background-color: #fcfcfc; + display: flex; + flex-direction: column; + padding-left: 10rpx; + padding-top: 3rpx; } .img-upload { @@ -54,23 +80,21 @@ } .container-item { - width: 100%; display: flex; flex-direction: column; - + justify-content: flex-start } .container-voice { width: 100%; display: flex; flex-direction: row; - align-items: center; } .fb-text { font-size: 35rpx; - margin-left: 30rpx; + margin-bottom: 10rpx; } .fb-submit { @@ -78,7 +102,7 @@ background-color: #1890FF; font-size: 35rpx; color: white; - margin-top: 50rpx; + margin-top: 200rpx; } .voice_img { @@ -116,7 +140,17 @@ border-radius: 15rpx; background-color: #1890FF; } - +.voice_delete{ + display: flex; + justify-content: space-between; + align-items: center; + margin-left: 16rpx; + padding: 0 6rpx; + box-sizing: border-box; + width: 55rpx; + height: 55rpx; + border-radius: 15rpx; +} .voice_content .left { display: flex; align-items: center; @@ -146,17 +180,72 @@ margin-right: 20rpx; } -.voice_starting{ +.voice_starting { position: fixed; top: 30%; left: 50%; transform: translate(-50%, -50%); - width: 200rpx; - height: 200rpx; - line-height: 200rpx; + width: 300rpx; + height: 300rpx; + align-items: center; + line-height: 300rpx; background-color: #787879; color: #fff; text-align: center; - border-radius: 100rpx; /* 浣垮叾鍛堢幇鍦嗗舰 */ + border-radius: 150rpx; + /* 浣垮叾鍛堢幇鍦嗗舰 */ z-index: 10000; +} + +.tabs { + display: flex; + justify-content: space-around; + position: relative; + width: 100%; + border-bottom: 1px solid #eee; + margin-bottom: 20rpx; + /* Tabs 鍗犳弧鏁翠釜妯悜灞忓箷 */ +} + +.tab { + font-size: 16px; + padding: 10px; + cursor: pointer; + position: relative; + width: 50%; + /* Tabs 骞冲垎鏁翠釜妯悜灞忓箷 */ + text-align: center; + /* 鏂囧瓧灞呬腑 */ +} + +.indicator { + width: 100%; + height: 3px; + background-color: #1890FF; + position: absolute; + bottom: 0; + left: 0; + transform: translateX(0); + /* 鍒濆鍖栦綅缃� */ +} + +.item { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + /*琛ㄧず涓嶆崲琛�*/ + padding-left: 40rpx; + padding-right: 40rpx; + width: calc(100% - 80rpx); + margin-bottom: 40rpx; +} + +.item-data { + display: flex; + flex-direction: column; + flex-grow: 1; +} + +.item-data text { + font-size: 30rpx; } \ No newline at end of file diff --git a/pages/home/home.js b/pages/home/home.js index fa1c834..c9b92e3 100644 --- a/pages/home/home.js +++ b/pages/home/home.js @@ -151,28 +151,34 @@ onShareAppMessage() { }, + // 鍏呭�� recharge() { - // wx.navigateTo({ - // url: '/pages/rechargeCard/rechargeCard', - // }) - wx.showToast({ - title: '鏆傛湭寮�鏀�', - icon: 'none' + wx.navigateTo({ + url: '/pages/rechargeCard/rechargeCard', }) + // wx.showToast({ + // title: '鏆傛湭寮�鏀�', + // icon: 'none' + // }) }, + //寮�鍏抽榾璁板綍 openValveList() { - // wx.navigateTo({ - // url: '/pages/valveList/valveList', - // }) - wx.showToast({ - title: '鏆傛湭寮�鏀�', - icon: 'none' + wx.navigateTo({ + url: '/pages/valveList/valveList', }) + // wx.showToast({ + // title: '鏆傛湭寮�鏀�', + // icon: 'none' + // }) }, + //闂鍙嶉 feedBack() { - wx.showToast({ - title: '鏆傛湭寮�鏀�', - icon: 'none' + // wx.showToast({ + // title: '鏆傛湭寮�鏀�', + // icon: 'none' + // }) + wx.navigateTo({ + url: '/pages/feedback/feedback', }) }, handleChange(e) { @@ -448,5 +454,8 @@ console.log('Failed to load parameter:false'); } + }, + onDelete(){ + } }) \ No newline at end of file diff --git a/pages/home/home.json b/pages/home/home.json index eefd2a2..296a6dd 100644 --- a/pages/home/home.json +++ b/pages/home/home.json @@ -3,7 +3,8 @@ "usingComponents": { "t-avatar": "tdesign-miniprogram/avatar/avatar", "t-switch": "tdesign-miniprogram/switch/switch", - "t-dialog": "tdesign-miniprogram/dialog/dialog" + "t-dialog": "tdesign-miniprogram/dialog/dialog", + "t-swipe-cell": "tdesign-miniprogram/swipe-cell/swipe-cell" }, "navigationBarTitleText": "澶х鑺傛按", "navigationBarTextStyle": "white", diff --git a/pages/home/home.wxml b/pages/home/home.wxml index 8120e82..5fab6fa 100644 --- a/pages/home/home.wxml +++ b/pages/home/home.wxml @@ -9,7 +9,7 @@ <text class="head-bottom">{{userPhone}}</text> </view> <view class="head-button-wrapper"> - <text class="unbind" bind:tap="feedBack">瑙g粦</text> + <text class="unbind" bind:tap="">瑙g粦</text> <text class="head-bottom" bind:tap="feedBack">鑱旂郴瀹㈡湇</text> </view> <view class="scen-view" bind:tap="scenCode"> @@ -33,7 +33,7 @@ <image src="/images/record.svg" /> <text>寮�鍏抽榾璁板綍</text> </view> - <view class="center-view" bind:tap="feedBack"> + <view class="center-view-question" bind:tap="feedBack"> <image src="/images/question.svg" /> <text>闂鍙嶉</text> </view> @@ -52,9 +52,12 @@ <view class="dot"></view> <view class="dot"></view> </view> + <view class="scroll-bg"> <view wx:if="{{listData.length > 0}}" class="list-item" wx:for="{{listData}}" wx:key="index"> - <view class="item-left"> + <t-swipe-cell style="width: 100%;" class="swipe-cell-base"> + <view class="swipe-cell" > + <view class="item-left"> <!-- <image class="item-img" src="/images/pipeline.svg" /> --> <text>{{item.intakeNum}}</text> <image class="item-img" src="{{item.isOnLine ? '/images/wifi_no.svg' : '/images/wifi_off.svg'}}" /> @@ -63,8 +66,13 @@ <!-- <t-switch class="switch" data-item="{{item}}" bindchange="handleChange" value="{{true}}" label="{{['寮�', '鍏�']}}" slot="note" /> --> <text class="item-button" bind:tap="handleChange" data-item="{{item}}">鍏抽榾</text> </view> + </view> + <view slot="right" class="delete-btn" bind:tap="onDelete">鍒犻櫎</view> + </t-swipe-cell> </view> </view> + + <view wx:if="{{listData.length === 0}}" class="noMore-View-home"> <image class="noMore-img" src="/images/no_more.svg" /> <text class="noMore-text">娌℃湁寮�娉佃褰�</text> diff --git a/pages/home/home.wxss b/pages/home/home.wxss index 0a918b8..bf6de6e 100644 --- a/pages/home/home.wxss +++ b/pages/home/home.wxss @@ -101,7 +101,8 @@ /* 浣� center-wrapper 鍦ㄥご閮ㄤ箣涓� */ } -.center-view { +.center-view, +.center-view-question { flex: 1; /* 姣忎釜鍏冪礌骞冲垎瀹藉害 */ display: flex; @@ -122,8 +123,17 @@ margin-bottom: 10rpx; /* 鍥炬爣鍜屾枃鏈箣闂寸殑闂磋窛 */ } - -.center-view text { +.center-view-question image{ + padding-top: 10rpx; + width: 75rpx; + /* 鏍规嵁闇�瑕佽皟鏁村浘鏍囧ぇ灏� */ + height: 75rpx; + /* 鏍规嵁闇�瑕佽皟鏁村浘鏍囧ぇ灏� */ + margin-bottom: 15rpx; + /* 鍥炬爣鍜屾枃鏈箣闂寸殑闂磋窛 */ +} +.center-view text, +.center-view-question text { margin-top: 15rpx; font-size: 30rpx; color: #1890FF; @@ -151,7 +161,7 @@ background-color: #fff; margin-bottom: 2rpx; display: flex; - justify-content: space-between; + align-items: center; padding-left: 30rpx; padding-right: 30rpx; @@ -222,9 +232,12 @@ justify-content: center; padding-bottom: 15rpx; } -.refresh-button:active{ - background-color: #7c7c7c; /* Change to a darker color when pressed */ + +.refresh-button:active { + background-color: #7c7c7c; + /* Change to a darker color when pressed */ } + .refresh-view { text-align: center; padding: 30rpx; @@ -288,7 +301,7 @@ .dialog { --td-dialog-content-font-size: 40rpx; - --td-dialog-content-line-height: 50rpx + --td-dialog-content-line-height: 60rpx } .noMore-View-home { @@ -317,7 +330,8 @@ } .item-button:active { - background-color: #7c7c7c; /* Change to a darker color when pressed */ + background-color: #7c7c7c; + /* Change to a darker color when pressed */ } .divider { @@ -353,4 +367,25 @@ .scen-view text { font-size: 30rpx; color: #ffffff; +} + +.delete-btn { + display: flex; + align-items: center; + justify-content: center; + width: 120rpx; + height: 100%; + color: white; + background-color: #e34d59; +} + +.swipe-cell{ + display: flex; + justify-content: space-between; /* 浣垮瓙鍏冪礌鍦ㄤ富杞翠笂鍧囧寑鍒嗗竷 */ + background-color: #fff; + margin-bottom: 2rpx; + width: 100wh; +} +.swipe-cell-base{ + } \ No newline at end of file diff --git a/pages/openCard/openCard.js b/pages/openCard/openCard.js index a3f47d4..101c497 100644 --- a/pages/openCard/openCard.js +++ b/pages/openCard/openCard.js @@ -14,7 +14,8 @@ vcId: "", activeIndex: -1, datetimeVisible: false, - datetime: new Date().getTime(), + dateStartTime: new Date().getTime(), + dateEndTime: new Date().getTime() + 24 * 60 * 60 * 1000, datetimeText: '', allCardPoints: [], // 鎵�鏈夎櫄鎷熷崱 irrigateProfile: [], //鑾峰彇鎵�閫夌亴婧夋柟寮忕殑璇︾粏鏁版嵁 @@ -36,7 +37,8 @@ radioValue: "0", //寮�闃�鏂瑰紡閫変腑鐨勭被鍨� costiomTime: "", //鑷畾涔夌亴婧夋椂闂� waterAmount: 0, //瀹氶噺寮�闃�鐨勬按閲� - costiomWater:"",//杈撳叆鐨勮嚜瀹氫箟姘撮噺 + costiomWater: "", //杈撳叆鐨勮嚜瀹氫箟姘撮噺 + isWXRefreshing:false, }, openValva(event) { const { @@ -51,7 +53,7 @@ // 閫夋嫨铏氭嫙鍗″悗 this.initDialogData(); this.setData({ - vcId: item.vcId, + vcId: item.id, }) } }, @@ -103,7 +105,10 @@ * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 */ onPullDownRefresh() { - + this.setData({ + isWXRefreshing: true + }); + this.getCardList(); }, /** @@ -163,7 +168,8 @@ }); // 鏇存柊鍒楄〃鏁版嵁 this.setData({ - allCardPoints: updatedList + allCardPoints: updatedList, + isWXRefreshing:false }); }, handleClost() { @@ -198,7 +204,7 @@ this.data.waterAmount = parseInt(this.data.irrigateProfile[index].defaultValue) this.setData({ activeIndex: parseInt(index), - costiomWater:"" + costiomWater: "" }); } }, @@ -431,11 +437,11 @@ const data = { intakeId: this.data.intakeId, //鍙栨按鍙D vcId: this.data.vcId, //铏氭嫙鍗D - minutes: this.data.waterAmount, //姘撮噺 + waterAmount: this.data.waterAmount, //姘撮噺 operator: app.globalData.sessionId //鎿嶄綔鍛� }; post({ - url: "/wx/valve/quantify_close", + url: "wx/valve/quantify_close", data: data }).then(response => { // 澶勭悊鎴愬姛鍝嶅簲 @@ -472,7 +478,7 @@ plannedOpenTime: this.data.openTime }; post({ - url: "/wx/valve/planed_open_quantify_close", + url: "wx/valve/planed_open_quantify_close", data: data }).then(response => { // 澶勭悊鎴愬姛鍝嶅簲 @@ -583,7 +589,7 @@ } }, //杈撳叆鑷畾涔夋按閲忕殑鐩戝惉 - onWaterInputChange(data){ + onWaterInputChange(data) { console.log(data.detail.value) if (data.detail.value !== "") { this.setData({ @@ -597,7 +603,7 @@ } }, // 瀹氶噺寮�娉垫寜閽� - btnOpenOnWater(){ + btnOpenOnWater() { if (this.data.waterAmount > 0) { if (this.data.isOpenTiming) { this.quantifyOpenTime(); @@ -610,7 +616,7 @@ title: '璇烽�夋嫨鎴栬緭鍏ョ亴婧夋椂闂达紒', }) } - } + }, }) \ No newline at end of file diff --git a/pages/openCard/openCard.wxml b/pages/openCard/openCard.wxml index 0299a1b..1a0dba6 100644 --- a/pages/openCard/openCard.wxml +++ b/pages/openCard/openCard.wxml @@ -1,7 +1,7 @@ <!--pages/openCard/openCard.wxml 寮�鍗℃椂鐨勮櫄鎷熷崱--> <view class="container"> - <scroll-view class="list-container" scroll-y="true" scroll-x="false"> + <scroll-view class="list-container" scroll-y="true" scroll-x="false" refresher-enabled="true" bindrefresherrefresh="onPullDownRefresh" refresher-triggered="{{isWXRefreshing}}"> <block wx:if="{{allCardPoints.length > 0}}" wx:for="{{allCardPoints}}" wx:key="index"> <view class="{{item.inUse===false?'item':'item-gray'}}"> <view class="item-card"> @@ -132,7 +132,7 @@ </view> </view> <!-- 骞存湀鏃ユ椂鍒� --> - <t-date-time-picker title="閫夋嫨鏃ユ湡鍜屾椂闂�" visible="{{datetimeVisible}}" mode="minute" value="{{datetime}}" format="YYYY-MM-DD HH:mm" bindchange="onConfirm" bindpick="onColumnChange" bindcancel="hidePicker" start="{{datetime}}"/> + <t-date-time-picker title="閫夋嫨鏃ユ湡鍜屾椂闂�" visible="{{datetimeVisible}}" mode="minute" value="{{datetime}}" format="YYYY-MM-DD HH:mm" bindchange="onConfirm" bindpick="onColumnChange" bindcancel="hidePicker" start="{{dateStartTime}}" end="{{dateEndTime}}"/> <!-- <t-dialog visible="{{showForceConfirm}}" content="褰撳墠铏氭嫙鍗¤鍗犵敤锛屾槸鍚﹀己鍒跺紑闃�锛�" confirm-btn="{{ { content: '寮哄埗寮�闃�', variant: 'base', theme: 'danger' } }}" cancel-btn="鍙栨秷" bind:confirm="confirmForceDialog" bind:cancel="cancelDialog" /> --> <t-dialog class="error-dialog" title="寮�闃�閿欒" visible="{{showErrorDialog}}" content="{{errorData}}" confirm-btn="{{ confirmBtn }}" bind:confirm="closeErrorDialog" /> </view> \ No newline at end of file diff --git a/pages/openCard/openCard.wxss b/pages/openCard/openCard.wxss index 7b21435..3c36ee5 100644 --- a/pages/openCard/openCard.wxss +++ b/pages/openCard/openCard.wxss @@ -1,6 +1,6 @@ /* pages/openCard/openCard.wxss */ .container { - height: 100%; + height: 100vh; display: flex; flex-direction: column; align-items: center; @@ -117,9 +117,10 @@ .list-container { display: flex; + flex-grow: 1; /* 鍗犳弧鍓╀綑楂樺害 */ padding-bottom: 30rpx; - flex: 1; height: 100%; + flex-direction: column; /* 纭繚鍐呴儴鍏冪礌鎸夊垪鎺掑垪 */ } .dialog { diff --git a/pages/rechargeCard/rechargeCard.js b/pages/rechargeCard/rechargeCard.js index 56a094a..9b634f2 100644 --- a/pages/rechargeCard/rechargeCard.js +++ b/pages/rechargeCard/rechargeCard.js @@ -9,19 +9,81 @@ * 椤甸潰鐨勫垵濮嬫暟鎹� */ data: { - confirmBtn: { content: '纭', variant: 'base' }, + confirmBtn: { + content: '纭' + }, currentTab: 0, // 褰撳墠鏄剧ず鐨勮〃鏍硷紝榛樿涓虹涓�涓〃鏍� - allCardPoints: [], - allWaterPoints:[], - showDialog:false + allCardPoints: [{ + "id": "string", + "inUse": 0, + "inUseName": "string", + "money": 110, + "vcNum": "200030000000" + }, { + "id": "string", + "inUse": 0, + "inUseName": "string", + "money": 110, + "vcNum": "200030000000" + }, { + "id": "string", + "inUse": 0, + "inUseName": "string", + "money": 110, + "vcNum": "200030000000" + }, { + "id": "string", + "inUse": 0, + "inUseName": "string", + "money": 110, + "vcNum": "200030000000" + }, { + "id": "string", + "inUse": 1, + "inUseName": "string", + "money": 110, + "vcNum": "200030000000" + }], + allWaterPoints: [{ + "id": "string", + "inUse": 1, + "inUseName": "string", + "money": 110, + "vcNum": "200030000000" + },{ + "id": "string", + "inUse": 1, + "inUseName": "string", + "money": 110, + "vcNum": "200030000000" + },{ + "id": "string", + "inUse": 1, + "inUseName": "string", + "money": 110, + "vcNum": "200030000000" + },{ + "id": "string", + "inUse": 1, + "inUseName": "string", + "money": 110, + "vcNum": "200030000000" + },{ + "id": "string", + "inUse": 1, + "inUseName": "string", + "money": 110, + "vcNum": "200030000000" + }], + showDialog: false }, - // 鍒囨崲 Tabs - switchTab: function (e) { - const tab = parseInt(e.currentTarget.dataset.tab); - this.setData({ - currentTab: tab - }); -}, + // 鍒囨崲 Tabs + switchTab: function (e) { + const tab = parseInt(e.currentTarget.dataset.tab); + this.setData({ + currentTab: tab + }); + }, /** * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 */ @@ -77,58 +139,67 @@ */ onShareAppMessage() { - },//鑾峰彇铏氭嫙鍗″垪琛� - getCardList(){ - get({url:'https://d4x9787456.vicp.fun/sell/virtual_card/get', data: { - operator: getApp().globalData.sessionId - }}) - .then((data) => { - if(data.success&&data.code==="0001"){ - this.setData({ - allCardPoints: data.content - }); - }else{ - wx.showToast({ - title: data.msg, - }) - } - console.log('Failed to add item:'); - }) - .catch((error) => { - console.error('Failed to add item:', error); - }); + }, //鑾峰彇铏氭嫙鍗″垪琛� + getCardList() { + get({ + url: 'wx/virtual_card/get', + data: { + clientId: getApp().globalData.clientId + } + }) + .then((data) => { + if (data.success && data.code === "0001") { + this.setData({ + allCardPoints: data.content + }); + this.updateDisplayText(); + } else { + wx.showToast({ + title: data.msg, + }) + } + console.log('Failed to add item:'); + }) + .catch((error) => { + console.error('Failed to add item:', error); + }); }, - getWaterCardList(){ - get({url:'https://d4x9787456.vicp.fun/sell/virtual_card/get', data: { - operator: getApp().globalData.sessionId - }}) - .then((data) => { - if(data.success&&data.code==="0001"){ - this.setData({ - allWaterPoints: data.content - }); - }else{ - wx.showToast({ - title: data.msg, - }) - } - console.log('Failed to add item:'); - }) - .catch((error) => { - console.error('Failed to add item:', error); - }); + getWaterCardList() { + get({ + url: 'https://d4x9787456.vicp.fun/sell/virtual_card/get', + data: { + operator: getApp().globalData.sessionId + } + }) + .then((data) => { + if (data.success && data.code === "0001") { + this.setData({ + allWaterPoints: data.content + }); + } else { + wx.showToast({ + title: data.msg, + }) + } + console.log('Failed to add item:'); + }) + .catch((error) => { + console.error('Failed to add item:', error); + }); }, - rechargeCard(item){ + rechargeCard(item) { wx.navigateTo({ url: '/pages/rechargeMoney/rechargMoney' // 棣栭〉鐨勮矾寰勶紝鏍规嵁瀹為檯鎯呭喌濉啓 }); }, - ruinCard(){ - - }, - closeDialog(){ + ruinCard() { this.setData({ - showDialog:false + showDialog: true + }) + }, + closeDialog() { + this.setData({ + showDialog: false }) } diff --git a/pages/rechargeCard/rechargeCard.wxml b/pages/rechargeCard/rechargeCard.wxml index cf37a96..79d2c9d 100644 --- a/pages/rechargeCard/rechargeCard.wxml +++ b/pages/rechargeCard/rechargeCard.wxml @@ -15,7 +15,7 @@ <!-- 铏氭嫙鍗� --> <scroll-view class="list-container" wx:if="{{currentTab === 0}}" scroll-y="true" scroll-x="false"> <block wx:if="{{allCardPoints.length > 0}}" wx:for="{{allCardPoints}}" wx:key="index"> - <view class="{{item.inUse===0?'item':'item-gray'}}"> + <view class="{{item.inUse===false?'item':'item-gray'}}"> <view class="item-card"> <text class="item-card-text">鍗$紪鍙凤細</text> <text class="item-card-text">{{item.vcNum}}</text> diff --git a/pages/valveList/valveList.js b/pages/valveList/valveList.js index 78d4eb5..2a416af 100644 --- a/pages/valveList/valveList.js +++ b/pages/valveList/valveList.js @@ -6,15 +6,31 @@ */ data: { listData: [{ - intakeNum: "1023356646612" + intakeNum: "1023356646612", + watername:"娴嬭瘯", + startTime:"2024.10.15 12:23", + endTime:"2024.10.15 16:23" + }, { - intakeNum: "1023356646612" + intakeNum: "1023356646612", + watername:"娴嬭瘯1", + startTime:"2024.10.15 12:23", + endTime:"2024.10.15 16:23" }, { - intakeNum: "1023356646612" + intakeNum: "1023356646612", + watername:"娴嬭瘯2", + startTime:"2024.10.15 12:23", + endTime:"2024.10.15 16:23" }, { - intakeNum: "1023356646612" + intakeNum: "1023356646612", + watername:"娴嬭瘯3", + startTime:"2024.10.15 12:23", + endTime:"2024.10.15 16:23" }, { - intakeNum: "1023356646612" + intakeNum: "1023356646612", + watername:"娴嬭瘯4", + startTime:"2024.10.15 12:23", + endTime:"2024.10.15 16:23" }] }, diff --git a/pages/valveList/valveList.wxml b/pages/valveList/valveList.wxml index b48f7ae..ac3d700 100644 --- a/pages/valveList/valveList.wxml +++ b/pages/valveList/valveList.wxml @@ -12,9 +12,9 @@ </view> </view> <text class="item-text">铏氭嫙鍗$紪鍙凤細{{item.intakeNum}}</text> - <text class="item-text">鍙栨按鍙g紪鍙凤細</text> - <text class="item-text">寮�闃�鏃堕棿锛�</text> - <text class="item-text">鍏抽榾鏃堕棿锛�</text> + <text class="item-text">鍙栨按鍙e悕绉帮細{{item.watername}}</text> + <text class="item-text">寮�闃�鏃堕棿锛歿{item.startTime}}</text> + <text class="item-text">鍏抽榾鏃堕棿锛歿{item.endTime}}</text> <view class="item-time"> <text class="item-text">鐢ㄦ按鏃堕暱锛�120 鍒嗛挓</text> <text class="item-text">鐢ㄦ按閲忥細2 m鲁</text> diff --git a/pages/waterIntake/waterIntake.js b/pages/waterIntake/waterIntake.js index a80b9b1..103b2a0 100644 --- a/pages/waterIntake/waterIntake.js +++ b/pages/waterIntake/waterIntake.js @@ -54,16 +54,15 @@ }, /** - * 閫夋嫨铏氭嫙鍗� + * 璺宠浆鍒伴�夋嫨铏氭嫙鍗$晫闈� * @param {} event */ choseCard(event) { - //鏄剧ず浜屾纭寮圭獥 this.setData({ - showConfirm: true, choseItem: event.currentTarget.dataset.item, allWaterPoints: [] }) + this.toOpenCard(); }, //寮�娉甸�氫俊 /** diff --git a/pages/waterIntake/waterIntake.wxss b/pages/waterIntake/waterIntake.wxss index 56c304a..8b40287 100644 --- a/pages/waterIntake/waterIntake.wxss +++ b/pages/waterIntake/waterIntake.wxss @@ -139,7 +139,7 @@ } .dialog{ --td-dialog-content-font-size:40rpx; - --td-dialog-content-line-height:50rpx + --td-dialog-content-line-height:60rpx } .error-dialog{ -- Gitblit v1.8.0