4个文件已删除
1 文件已重命名
25个文件已修改
6个文件已添加
| | |
| | | BASEURL = '' |
| | | break |
| | | case 'test': |
| | | BASEURL = 'https://44978f7456.imdo.co/remote/' |
| | | BASEURL = 'https://irrigate.dayuyanjiuyuan.top/' |
| | | break |
| | | default: |
| | | BASEURL = '' |
| | |
| | | }) |
| | | }, |
| | | globalData: { |
| | | sessionId:'2024042414041300006', |
| | | sessionId:'2024052821300200006', |
| | | userInfo: null, |
| | | userId:"", |
| | | userCode:"", |
| | |
| | | { |
| | | "pages": [ |
| | | |
| | | "pages/home/home", |
| | | "pages/valveList/valveList", |
| | | "pages/feedback/feedback", |
| | | "pages/wxlogin/wxlogin", |
| | | "pages/login/login", |
| | | "pages/wxbind/wxbind", |
| | | "pages/rechargeList/rechargeList", |
| | | "pages/wallet/wallet", |
| | | "pages/index/index", |
| | | "pages/logs/logs", |
| | | "pages/my/my", |
| | | "pages/waterIntake/waterIntake", |
| | | "pages/personCharge/personcharge", |
| | | "pages/feedback/feedback", |
| | | "pages/openCard/openCard", |
| | | "pages/rechargeMoney/rechargMoney", |
| | | "pages/rechargeCard/rechargeCard" |
| | |
| | | box-sizing: border-box; |
| | | } |
| | | .noMore-View { |
| | | flex: 1; |
| | | display: flex; |
| | | /* display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | align-items: center; |
| | | height: 100%; |
| | | text-align: center; |
| | | flex-direction: column; |
| | | height: 100vh; |
| | | width: 100%; |
| | | text-align: center; */ |
| | | display: flex; |
| | | flex-direction: column; /* 确保子元素纵向排列 */ |
| | | justify-content: center; /* 垂直居中 */ |
| | | align-items: center; /* 水平居中 */ |
| | | height: 100%; /* 让容器高度占满父元素 */ |
| | | } |
| | | |
| | | .noMore-img{ |
| | |
| | | |
| | | .noMore-text{ |
| | | color:#969494; |
| | | } |
| | | |
| | | .list-container { |
| | | display: flex; |
| | | flex: 1; |
| | | overflow-y: auto; |
| | | z-index: 0; |
| | | margin-top: 10rpx; |
| | | } |
| New file |
| | |
| | | <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="18.6175537109375" height="18.306396484375" viewBox="0 0 18.6175537109375 18.306396484375" fill="none"> |
| | | <path d="M14.3121 18.3064C13.4059 18.3064 12.3896 18.135 11.3243 17.8043C8.76513 17.0084 6.24269 15.3431 4.22229 13.1145C1.19781 9.7717 -0.24709 6.44109 0.0345342 3.47782C0.120245 2.74312 0.35291 1.81251 1.45494 1.06558C2.29984 0.379873 3.26719 -0.0119789 4.02635 0.000278951C4.82229 0.0125132 5.09168 0.294138 5.91208 1.4819C7.1733 3.22069 7.25901 4.07782 7.21003 4.56762C7.12432 5.37579 6.6835 5.73089 6.27942 6.04924C6.18147 6.12272 6.0835 6.20843 5.99779 6.28191C5.508 6.9064 4.908 7.77579 7.47942 10.4329C9.67127 12.539 10.859 12.7962 11.361 12.7594C11.7529 12.735 11.8998 12.5268 11.961 12.4533L11.9733 12.4411C12.7937 11.2901 13.0631 11.0084 13.8468 10.886C14.6059 10.7635 14.9978 11.0084 16.6141 12.0248C18.0713 12.9431 18.7447 13.5554 18.5978 14.5227C18.5488 15.5758 17.7406 17.0084 16.8345 17.6574C16.21 18.086 15.3406 18.3064 14.3121 18.3064Z" fill="#2D8BF7" > |
| | | </path> |
| | | </svg> |
| New file |
| | |
| | | <?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"><rect x="17" y="4" width="14" height="27" rx="7" fill="none" stroke="#1890FF" stroke-width="4" stroke-linejoin="round"/><path d="M9 23C9 31.2843 15.7157 38 24 38C32.2843 38 39 31.2843 39 23" stroke="#1890FF" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M24 38V44" stroke="#1890FF" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></svg> |
| | |
| | | data: { |
| | | recordingSrc: '', |
| | | isRecording: false, |
| | | isshowVoiceMask: true, //是否显示录音中 |
| | | voiceTime: 2, //录音时长 |
| | | 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', |
| | | } |
| | | ] |
| | | }, |
| | | |
| | | onLoad() { |
| | | this.recorderManager = wx.getRecorderManager(); |
| | | |
| | | this.recorderManager.onStart(() => { |
| | | console.log('recorder start'); |
| | | this.setData({ isRecording: true }); |
| | | this.setData({ |
| | | isRecording: true |
| | | }); |
| | | this.startWaveformDrawing(); |
| | | }); |
| | | |
| | | this.recorderManager.onStop((res) => { |
| | | console.log('recorder stop', res); |
| | | const { tempFilePath } = res; |
| | | const { |
| | | tempFilePath |
| | | } = res; |
| | | this.setData({ |
| | | recordingSrc: tempFilePath, |
| | | isRecording: false |
| | |
| | | |
| | | this.recorderManager.onError((res) => { |
| | | console.error(res); |
| | | this.setData({ isRecording: false }); |
| | | this.setData({ |
| | | isRecording: false |
| | | }); |
| | | this.stopWaveformDrawing(); |
| | | }); |
| | | }, |
| | | |
| | | startRecording() { |
| | | if (this.data.isRecording) return; |
| | | |
| | | wx.authorize({ |
| | | scope: 'scope.record', |
| | | success: () => { |
| | | const options = { |
| | | duration: 60000, |
| | | sampleRate: 44100, |
| | | numberOfChannels: 1, |
| | | encodeBitRate: 192000, |
| | | format: 'aac', |
| | | frameSize: 50 |
| | | }; |
| | | this.recorderManager.start(options); |
| | | }, |
| | | fail: () => { |
| | | wx.showModal({ |
| | | title: '授权失败', |
| | | content: '请授权录音功能', |
| | | showCancel: false |
| | | }); |
| | | } |
| | | handleRemove(e) { |
| | | console.log("handleRemove"); |
| | | const { |
| | | index |
| | | } = e.detail; |
| | | const { |
| | | originFiles |
| | | } = this.data; |
| | | originFiles.splice(index, 1); |
| | | this.setData({ |
| | | originFiles, |
| | | }); |
| | | }, |
| | | |
| | | stopRecording() { |
| | | if (!this.data.isRecording) return; |
| | | |
| | | this.recorderManager.stop(); |
| | | handleClick() { |
| | | console.log("handleClick"); |
| | | }, |
| | | |
| | | startWaveformDrawing() { |
| | | if (this.waveformInterval) return; |
| | | |
| | | const canvasContext = wx.createCanvasContext('waveform'); |
| | | const drawWaveform = () => { |
| | | if (!this.data.isRecording) return; |
| | | |
| | | // 生成模拟的音量数据 |
| | | const data = new Array(100).fill(0).map(() => Math.random() * 100); |
| | | |
| | | canvasContext.clearRect(0, 0, 300, 100); |
| | | canvasContext.beginPath(); |
| | | canvasContext.moveTo(0, 50); |
| | | for (let i = 0; i < data.length; i++) { |
| | | const x = (i / data.length) * 300; |
| | | const y = 50 - data[i] / 2; |
| | | canvasContext.lineTo(x, y); |
| | | } |
| | | canvasContext.lineTo(300, 50); |
| | | canvasContext.stroke(); |
| | | canvasContext.draw(); |
| | | |
| | | this.waveformInterval = setTimeout(drawWaveform, 100); |
| | | }; |
| | | |
| | | drawWaveform(); |
| | | handleAdd(e) { |
| | | console.log("handleAdd"); |
| | | const { |
| | | files |
| | | } = e.detail; |
| | | const { |
| | | originFiles |
| | | } = this.data; |
| | | this.setData({ |
| | | originFiles: [...originFiles, ...files], // 此时设置了 fileList 之后才会展示选择的图片 |
| | | }); |
| | | }, |
| | | /** |
| | | * 上传图片 |
| | | */ |
| | | onUpload() { |
| | | wx.uploadFile({ |
| | | url: 'https://example.weixin.qq.com/upload', // 仅为示例,非真实的接口地址 |
| | | filePath: file.url, |
| | | name: 'file', |
| | | formData: { |
| | | user: 'test' |
| | | }, |
| | | success: () => { |
| | | this.setData({ |
| | | [`fileList[${length}].status`]: 'done', |
| | | }); |
| | | }, |
| | | }); |
| | | }, |
| | | //按住按钮 |
| | | startHandel () { |
| | | this.setData({ |
| | | isShowVoiceMask:true |
| | | }) |
| | | console.log("开始录音") |
| | | wx.getRecorderManager().start({ |
| | | duration: 0 |
| | | }) |
| | | }, |
| | | //松开按钮 |
| | | endHandle () { |
| | | this.setData({ |
| | | isShowVoiceMask:false |
| | | }) |
| | | 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'); |
| | | this.setData({ |
| | | line2Opcity: 1, |
| | | line3Opcity: 1 |
| | | }) |
| | | },900) |
| | | timer5 = setTimeout(()=>{ |
| | | console.log('timer5'); |
| | | this.setData({ |
| | | line2Opcity: 0, |
| | | line3Opcity: 0 |
| | | }) |
| | | },1200) |
| | | },1200) |
| | | // 倒计时 |
| | | timer1 = setInterval(()=>{ |
| | | time--; |
| | | if(time <= 0){ |
| | | clearInterval(timer1) |
| | | return |
| | | } |
| | | },1000) |
| | | |
| | | stopWaveformDrawing() { |
| | | clearTimeout(this.waveformInterval); |
| | | this.waveformInterval = null; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | }); |
| | |
| | | { |
| | | "component": true, |
| | | "usingComponents": { |
| | | "t-upload": "tdesign-miniprogram/upload/upload" |
| | | }, |
| | | "navigationBarTitleText": "问题反馈", |
| | | "navigationBarTextStyle": "white" |
| | | } |
| | |
| | | <view class="container"> |
| | | <button class="btn" bindtouchstart="startRecording" bindtouchend="stopRecording"> |
| | | 按住录音 |
| | | </button> |
| | | <view wx:if="{{isRecording}}" class="recording-overlay"> |
| | | <canvas canvas-id="waveform" style="width: 300px; height: 100px;"></canvas> |
| | | |
| | | <view class="container-item"> |
| | | <text class="fb-text">反馈详情:</text> |
| | | <textarea class="input-class" /> |
| | | </view> |
| | | <audio src="{{recordingSrc}}" controls></audio> |
| | | <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> |
| | | </view> |
| | | </view> |
| | | <!-- 录音中 --> |
| | | <view wx:if="{{isShowVoiceMask}}" class="voice_starting">录音中</view> |
| | | <button class="fb-submit">提交</button> |
| | | </view> |
| | |
| | | .container { |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | justify-content: center; |
| | | height: 100vh; |
| | | padding: 20px; |
| | | padding-left: 30rpx; |
| | | padding-right: 30rpx; |
| | | width: calc(100% - 0rpx); |
| | | /* 考虑了左右边距后的实际宽度 */ |
| | | background-color: #fff; |
| | | justify-content: flex-start; |
| | | align-items: center; |
| | | } |
| | | |
| | | .btn { |
| | |
| | | background-color: rgba(0, 0, 0, 0.7); |
| | | z-index: 9999; |
| | | } |
| | | |
| | | .input-class { |
| | | border-radius: 5px; |
| | | border: 2rpx solid #000000; |
| | | height: 20vh; |
| | | width: 100%; |
| | | background-color: #fcfcfc; |
| | | } |
| | | |
| | | .img-upload { |
| | | font-size: 35rpx; |
| | | margin-left: 30rpx; |
| | | } |
| | | |
| | | .container-item { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | } |
| | | |
| | | .container-voice { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-direction: row; |
| | | |
| | | align-items: center; |
| | | } |
| | | |
| | | .fb-text { |
| | | font-size: 35rpx; |
| | | margin-left: 30rpx; |
| | | } |
| | | |
| | | .fb-submit { |
| | | width: 80%; |
| | | background-color: #1890FF; |
| | | font-size: 35rpx; |
| | | color: white; |
| | | margin-top: 50rpx; |
| | | } |
| | | |
| | | .voice_img { |
| | | width: 80rpx; |
| | | height: 70rpx; |
| | | } |
| | | |
| | | .divider { |
| | | height: 1px; |
| | | /* 设置分割线高度 */ |
| | | background-color: #d3d3d3; |
| | | /* 设置分割线颜色 */ |
| | | margin: 10px 0; |
| | | /* 设置分割线的上下间距 */ |
| | | width: 100%; |
| | | } |
| | | |
| | | .voice_wrapper { |
| | | display: flex; |
| | | align-items: center; |
| | | background-color: #fff; |
| | | padding: 10px; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .voice_content { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | margin-left: 16rpx; |
| | | padding: 0 6rpx; |
| | | box-sizing: border-box; |
| | | width: 200rpx; |
| | | height: 80rpx; |
| | | border-radius: 15rpx; |
| | | background-color: #1890FF; |
| | | } |
| | | |
| | | .voice_content .left { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .voice_content .left .line { |
| | | width: 8rpx; |
| | | background-color: white; |
| | | margin-left: 10rpx; |
| | | } |
| | | |
| | | .voice_content .left .line:nth-child(1) { |
| | | height: 24rpx; |
| | | } |
| | | |
| | | .voice_content .left .line:nth-child(2) { |
| | | height: 36rpx; |
| | | } |
| | | |
| | | .voice_content .left .line:nth-child(3) { |
| | | height: 45rpx; |
| | | } |
| | | |
| | | .right { |
| | | font-size: 35rpx; |
| | | color: #ffffff; |
| | | margin-right: 20rpx; |
| | | } |
| | | |
| | | .voice_starting{ |
| | | position: fixed; |
| | | top: 30%; |
| | | left: 50%; |
| | | transform: translate(-50%, -50%); |
| | | width: 200rpx; |
| | | height: 200rpx; |
| | | line-height: 200rpx; |
| | | background-color: #787879; |
| | | color: #fff; |
| | | text-align: center; |
| | | border-radius: 100rpx; /* 使其呈现圆形 */ |
| | | z-index: 10000; |
| | | } |
| | |
| | | data: { |
| | | sessionId: "", |
| | | showConfirm: false, |
| | | myItem:{}, |
| | | myItem: {}, |
| | | waterIntakeName: "", |
| | | image: "/images/ic_head_bg.jpg", |
| | | userPhone: "158****0723", |
| | |
| | | isRefreshing: true |
| | | }); |
| | | this.getOpenList(); |
| | | |
| | | |
| | | } |
| | | |
| | | }, |
| | |
| | | }); |
| | | //当开阀成功后调用刷新 |
| | | console.log("onLoad:" + options.param); |
| | | if(options.param){ |
| | | if (options.param) { |
| | | wx.showToast({ |
| | | title: '开泵成功', |
| | | title: '开阀成功', |
| | | icon: 'success', |
| | | duration: 2000 |
| | | duration: 3000 |
| | | }) |
| | | getOpenList() ; |
| | | this.getOpenList(); |
| | | } |
| | | this.getUserDataBySession(); |
| | | }, |
| | | |
| | | /** |
| | |
| | | }) |
| | | }, |
| | | openValveList() { |
| | | wx.showToast({ |
| | | title: '正在开发中', |
| | | icon: 'none' |
| | | wx.navigateTo({ |
| | | url: '/pages/valveList/valveList', |
| | | }) |
| | | }, |
| | | feedBack() { |
| | | wx.showToast({ |
| | | title: '正在开发中', |
| | | title: '暂未开放', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | |
| | | this.setData({ |
| | | showConfirm: true, |
| | | waterIntakeName: item.intakeNum, |
| | | myItem:item |
| | | myItem: item |
| | | }); |
| | | }, |
| | | closeDialog() { |
| | |
| | | * @param {*} vcNum 虚拟卡编号 |
| | | */ |
| | | postCloseValaue(orderNo, rtuAddr, vcNum) { |
| | | wx.showLoading({ |
| | | title: '正在关阀请稍候...', // 加载提示文字 |
| | | mask: true // 是否显示透明蒙层,防止触摸穿透,默认为 false |
| | | }); |
| | | const app = getApp(); |
| | | const data = { |
| | | rtuAddr: rtuAddr, |
| | | rtuAddr: rtuAddr, |
| | | vcNum: vcNum, //虚拟卡ID |
| | | orderNo:orderNo, |
| | | userType: 2, //用户类型1-平台,2-App |
| | | orderNo: orderNo, |
| | | operator: app.globalData.sessionId //操作员 |
| | | }; |
| | | console.log("postCloseValaue"+data); |
| | | console.log("postCloseValaue" + data); |
| | | post({ |
| | | url: "valve/close", |
| | | url: "wx/valve/close_wx", |
| | | data: data, |
| | | isShowLoding:true |
| | | isShowLoding: false |
| | | }).then(response => { |
| | | |
| | | // 处理成功响应 |
| | | console.log('请求成功:', response); |
| | | // 加载完成后隐藏加载动画 |
| | | wx.hideLoading(); |
| | | //完成后回到首页 |
| | | wx.reLaunch({ |
| | | url: '/pages/home/home?param=true' // 首页的路径,根据实际情况填写 |
| | | }); |
| | | this.getOpenList(); |
| | | wx.showToast({ |
| | | title: '关阀成功', |
| | | icon: 'success', |
| | | duration: 3000 |
| | | }) |
| | | }).catch(error => { |
| | | wx.hideLoading(); |
| | | if (error.code === "1002") { |
| | | wx.showToast({ |
| | | title: '关阀失败', |
| | | icon: 'error', |
| | | duration: 3000 // 提示的持续时间,单位毫秒 |
| | | }) |
| | | } |
| | | // 处理错误响应 |
| | | console.error('请求失败:', error); |
| | | |
| | | }); |
| | | }, |
| | | /** |
| | |
| | | getOpenList() { |
| | | const app = getApp(); |
| | | const params = { |
| | | url: 'valve/get', |
| | | url: 'wx/valve/get', |
| | | data: { |
| | | operator: app.globalData.sessionId |
| | | } |
| | |
| | | }) |
| | | }).catch(err => { |
| | | // 错误回调 |
| | | |
| | | this.setData({ |
| | | isRefreshing: false, // 将triggered属性设置为false,表示下拉刷新已完成 |
| | | }) |
| | |
| | | * 确认关闭回调 |
| | | * @param {} item |
| | | */ |
| | | confirmDialog(){ |
| | | confirmDialog() { |
| | | this.setData({ |
| | | showConfirm: false |
| | | }); |
| | | this.postCloseValaue(this.data.myItem.orderNo,this.data.myItem.rtuAddr,this.data.myItem.vcNum); |
| | | this.postCloseValaue(this.data.myItem.orderNo, this.data.myItem.rtuAddr, this.data.myItem.vcNum); |
| | | }, |
| | | //根据session获取农户信息 |
| | | getUserDataBySession() { |
| | | const app = getApp(); |
| | | const params = { |
| | | url: 'sell/client/simple_info', |
| | | data: { |
| | | sessionId: app.globalData.sessionId |
| | | } |
| | | }; |
| | | get(params).then(data => { |
| | | this.setData({ |
| | | userName: data.content.clientName, |
| | | userPhone: this.maskPhoneNumber(data.content.phone) |
| | | }) |
| | | }).catch(err => { |
| | | // 错误回调 |
| | | |
| | | }) |
| | | }, |
| | | maskPhoneNumber(phoneNumber) { |
| | | if (phoneNumber.length !== 11) { |
| | | throw new Error("Phone number must be 11 digits"); |
| | | } |
| | | // 使用正则表达式替换中间四位数字为星号 |
| | | const maskedPhoneNumber = phoneNumber.replace(/^(\d{3})\d{4}(\d{4})$/, "$1****$2"); |
| | | return maskedPhoneNumber; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | <text class="head-bottom">{{userPhone}}</text> |
| | | </view> |
| | | <view class="head-button-wrapper"> |
| | | <text class="unbind">解绑</text> |
| | | <text class="head-bottom">联系客服</text> |
| | | <text class="unbind" bind:tap="feedBack">解绑</text> |
| | | <text class="head-bottom" bind:tap="feedBack">联系客服</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <text class="bottom-title-text">快速关阀</text> |
| | | <text class="refresh-button" bind:tap="startPullDownRefresh">刷新</text> |
| | | </view> |
| | | <view class="divider"></view> |
| | | <!-- refresher-enabled="true" refresher-threshold="50" --> |
| | | <scroll-view class="scroll-view" scroll-x="false" scroll-y="true" refresher-enabled="{{isRefreshing==false?true:false}}" refresher-threshold="50" bindrefresherrefresh="onPullDownRefresh" refresher-triggered="{{isWXRefreshing}}"> |
| | | <view wx:if="{{isRefreshing}}" class="refresh-view"> |
| | |
| | | <image class="item-img" src="{{item.isOnLine ? '/images/wifi_no.svg' : '/images/wifi_off.svg'}}" /> |
| | | </view> |
| | | <view> |
| | | <t-switch wx:if="{{item.isOnLine }}" class="switch" data-item="{{item}}" bindchange="handleChange" value="{{true}}" label="{{['开', '关']}}" slot="note" /> |
| | | <!-- <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> |
| | | <view wx:if="{{listData.length === 0}}" class="noMore-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> |
| | | <text class="noMore-text">没有开泵记录</text> |
| | | </view> |
| | | </scroll-view> |
| | | <t-dialog class="t-dialog" visible="{{showConfirm}}" content="确认关闭{{waterIntakeName}}吗?" confirm-btn="{{ { content: '确认', variant: 'base', theme: 'danger' } }}" close-on-overlay-click="false" cancel-btn="取消" bind:confirm="confirmDialog" bind:cancel="closeDialog" /> |
| | |
| | | /* pages/home/home.wxss */ |
| | | .base-wrapper { |
| | | background-color: #f5f5f5; |
| | | background-color: #ececec; |
| | | width: 100%; |
| | | height: 100vh; |
| | | overflow: hidden; |
| | |
| | | |
| | | .head-text-wrapper text { |
| | | color: #fff; |
| | | font-size: 32rpx; |
| | | } |
| | | |
| | | .balance-label { |
| | |
| | | |
| | | .list-item { |
| | | background-color: #fff; |
| | | margin-top: 2rpx; |
| | | margin-bottom: 2rpx; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | padding-left: 30rpx; |
| | | padding-right: 30rpx; |
| | | padding-top: 20rpx; |
| | | padding-bottom: 20rpx; |
| | | padding-top: 30rpx; |
| | | padding-bottom: 30rpx; |
| | | margin-left: 20rpx; |
| | | margin-right: 20rpx; |
| | | } |
| | |
| | | /* 去掉按钮边框 */ |
| | | border-radius: 5px; |
| | | /* 按钮圆角 */ |
| | | padding-left: 20rpx; |
| | | padding-right: 20rpx; |
| | | padding-top: 10rpx; |
| | | padding-bottom: 10rpx; |
| | | padding-left: 25rpx; |
| | | padding-right: 25rpx; |
| | | padding-top: 15rpx; |
| | | padding-bottom: 15rpx; |
| | | } |
| | | |
| | | .refresh-view { |
| | |
| | | } |
| | | |
| | | @keyframes blink { |
| | | 0%, 80%, 100% { |
| | | |
| | | 0%, |
| | | 80%, |
| | | 100% { |
| | | opacity: 0; |
| | | } |
| | | |
| | | 40% { |
| | | opacity: 1; |
| | | } |
| | | } |
| | | .switch{ |
| | | |
| | | .switch { |
| | | --td-switch-checked-color: #1890FF; |
| | | } |
| | | |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .item-left text{ |
| | | |
| | | .item-left text { |
| | | font-size: 40rpx; |
| | | min-width: 150rpx; |
| | | } |
| | | |
| | | .item-img { |
| | | width: 40rpx; |
| | | /* 根据需要调整图标大小 */ |
| | |
| | | /* 根据需要调整图标大小 */ |
| | | margin-left: 20rpx; |
| | | } |
| | | .t-dialog{ |
| | | --td-dialog-content-font-size:40rpx; |
| | | --td-dialog-content-line-height:50rpx |
| | | |
| | | .t-dialog { |
| | | --td-dialog-content-font-size: 40rpx; |
| | | --td-dialog-content-line-height: 50rpx |
| | | } |
| | | |
| | | .noMore-View-home { |
| | | display: flex; |
| | | flex-direction: column; |
| | | /* 确保子元素纵向排列 */ |
| | | justify-content: center; |
| | | /* 垂直居中 */ |
| | | align-items: center; |
| | | /* 水平居中 */ |
| | | height: 100%; |
| | | /* 让容器高度占满父元素 */ |
| | | } |
| | | |
| | | .item-button { |
| | | display: flex; |
| | | height: 80rpx; |
| | | padding: 0 60rpx; |
| | | background-color: #1890FF; |
| | | color: white; |
| | | border: none; |
| | | border-radius: 20rpx; |
| | | font-size: 30rpx; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .divider { |
| | | width: 100%; |
| | | margin-top: 2rpx; |
| | | /* background-color: #e0e0e0; */ |
| | | } |
| | |
| | | if (item.inUse === 0) { |
| | | // 在页面加载时显示加载动画 |
| | | wx.showLoading({ |
| | | title: '正在开泵请稍后...', // 加载提示文字 |
| | | title: '正在开泵请稍候...', // 加载提示文字 |
| | | mask: true // 是否显示透明蒙层,防止触摸穿透,默认为 false |
| | | }); |
| | | this.postOpenValva(item.vcId); |
| | |
| | | const data = { |
| | | intakeId: this.data.intakeId, //取水口ID |
| | | vcId: vcId, //虚拟卡ID |
| | | userType: 2, //用户类型1-平台,2-App |
| | | operator: app.globalData.sessionId //操作员 |
| | | }; |
| | | post({ |
| | | url: "comRes/receive", |
| | | url: "8087/wx/valve/open_wx", |
| | | data: data |
| | | }).then(response => { |
| | | |
| | | |
| | | // 处理成功响应 |
| | | console.log('请求成功:', response); |
| | | // 加载完成后隐藏加载动画 |
| | |
| | | wx.reLaunch({ |
| | | url: '/pages/home/home?param=true' // 首页的路径,根据实际情况填写 |
| | | }); |
| | | |
| | | |
| | | }).catch(error => { |
| | | // 加载完成后隐藏加载动画 |
| | | wx.hideLoading(); |
| | | // 处理错误响应 |
| | | console.error('请求失败:', error); |
| | | if (error.code === "1002") { |
| | | wx.showToast({ |
| | | title: '开泵失败', |
| | | icon: 'error', |
| | | duration: 3000 // 提示的持续时间,单位毫秒 |
| | | }) |
| | | } |
| | | }); |
| | | }, |
| | | /** |
| | |
| | | intakeId |
| | | }) |
| | | console.log('intakeId:' + this.data.intakeId); |
| | | this. getCardList(); |
| | | this.getCardList(); |
| | | }, |
| | | |
| | | /** |
| | |
| | | |
| | | }, |
| | | //获取虚拟卡列表 |
| | | 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: '8084/sell/virtual_card/get', |
| | | data: { |
| | | clientId: 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); |
| | | }); |
| | | } |
| | | }) |
| | |
| | | <view class="container"> |
| | | |
| | | <scroll-view class="list-container" scroll-y="true" scroll-x="false"> |
| | | <block wx:for="{{allCardPoints}}" wx:key="index"> |
| | | <block wx:if="{{allCardPoints.length > 0}}" wx:for="{{allCardPoints}}" wx:key="index"> |
| | | <view class="{{item.inUse===0?'item':'item-gray'}}"> |
| | | <view class="item-card"> |
| | | <text>卡编号:</text> |
| | |
| | | /* 底部对齐 */ |
| | | } |
| | | |
| | | .list-container{ |
| | | .list-container { |
| | | display: flex; |
| | | padding-bottom: 30rpx; |
| | | flex: 1; |
| | | height: 100%; |
| | | } |
| New file |
| | |
| | | // pages/rechargeCard/rechargeCard.js |
| | | const { |
| | | get, |
| | | post |
| | | } = require('../../api/request.js'); |
| | | Page({ |
| | | |
| | | /** |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | confirmBtn: { content: '确认', variant: 'base' }, |
| | | currentTab: 0, // 当前显示的表格,默认为第一个表格 |
| | | allCardPoints: [], |
| | | allWaterPoints:[], |
| | | showDialog:false |
| | | }, |
| | | // 切换 Tabs |
| | | switchTab: function (e) { |
| | | const tab = parseInt(e.currentTarget.dataset.tab); |
| | | this.setData({ |
| | | currentTab: tab |
| | | }); |
| | | }, |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | this.getCardList(); |
| | | this.getWaterCardList(); |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面初次渲染完成 |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面隐藏 |
| | | */ |
| | | onHide() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面卸载 |
| | | */ |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | 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); |
| | | }); |
| | | }, |
| | | 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){ |
| | | wx.navigateTo({ |
| | | url: '/pages/rechargeMoney/rechargMoney' // 首页的路径,根据实际情况填写 |
| | | }); |
| | | }, |
| | | ruinCard(){ |
| | | |
| | | }, |
| | | closeDialog(){ |
| | | this.setData({ |
| | | showDialog:false |
| | | }) |
| | | } |
| | | |
| | | |
| | | }) |
| | |
| | | { |
| | | "usingComponents": {} |
| | | "usingComponents": { |
| | | "t-dialog": "tdesign-miniprogram/dialog/dialog" |
| | | } |
| | | } |
| | |
| | | <text class="item-balance-text-yuan">元</text> |
| | | </view> |
| | | <view class="button-view"> |
| | | <text wx:if="{{item.inUse==0}}" class="ruinCard">销卡</text> |
| | | <text wx:if="{{item.inUse==0}}" class="ruinCard" bind:tap="ruinCard">销卡</text> |
| | | <text wx:if="{{item.inUse==0}}" class="recharge" bind:tap="rechargeCard">充值</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </block> |
| | | |
| | | <view wx:if="{{allCardPoints.length === 0}}" class="noMore-View"> |
| | | <image class="noMore-img" src="/images/no_more.svg" /> |
| | | <text class="noMore-text">没有数据</text> |
| | | </view> |
| | | <t-dialog visible="{{showDialog}}" content="您还有余额未使用,如需销卡,请先使用完或退款后才可操作。" confirm-btn="{{ confirmBtn }}" bind:confirm="closeDialog" /> |
| | | </scroll-view> |
| | | |
| | | <!-- 水卡 --> |
| | |
| | | padding: 15rpx 30rpx; |
| | | border-radius: 30rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | } |
| | | |
| | |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | userName: "张三", |
| | | userPhone: "15802220723", |
| | | userCode: "15584236", |
| | | balance: "1025元", |
| | | activeIndex: -1, |
| | | userName: "张三", |
| | | userPhone: "15802220723", |
| | | userCode: "15584236", |
| | | balance: "1025元", |
| | | activeIndex: -1, |
| | | allRechargeList: [{ |
| | | time: "2024-05-12:20:20", |
| | | type: "远程", |
| | | morny: "500元" |
| | | }, { |
| | | time: "2024-05-12:20:20", |
| | | type: "远程", |
| | | morny: "500元" |
| | | }, { |
| | | time: "2024-05-12:20:20", |
| | | type: "远程", |
| | | morny: "500元" |
| | | }, { |
| | | time: "2024-05-12:20:20", |
| | | type: "远程", |
| | | morny: "500元" |
| | | }] |
| | | }, |
| | | |
| | | /** |
| | |
| | | onShareAppMessage() { |
| | | |
| | | }, |
| | | handleMoneyWrapperTap: function (e) { |
| | | const index = e.currentTarget.dataset.index; |
| | | console.log(index) |
| | | if (index !== undefined) { |
| | | this.setData({ |
| | | activeIndex: parseInt(index), |
| | | }); |
| | | } |
| | | |
| | | }, |
| | | handleMoneyWrapperTap: function (e) { |
| | | const index = e.currentTarget.dataset.index; |
| | | console.log(index) |
| | | if (index !== undefined) { |
| | | this.setData({ |
| | | activeIndex: parseInt(index), |
| | | }); |
| | | } |
| | | }, |
| | | onPullDownRefresh() { |
| | | console.log("onPullDownRefresh") |
| | | } |
| | | }) |
| | |
| | | |
| | | <view class="money-base-wrapper"> |
| | | <view class="row"> |
| | | <view class="item {{activeIndex === 0 ? 'active' : ''}}" bindtap="handleMoneyWrapperTap" data-index="0"> |
| | | <view class="item{{activeIndex === 0 ? 'active' : ''}}" bindtap="handleMoneyWrapperTap" data-index="0"> |
| | | <view class="money-wrapper"> |
| | | <text class="money-number">100</text> |
| | | <text class="money-label">元</text> |
| | | </view> |
| | | </view> |
| | | <view class="item {{activeIndex === 1 ? 'active' : ''}}" bindtap="handleMoneyWrapperTap" data-index="1"> |
| | | <view class="item{{activeIndex === 1 ? 'active' : ''}}" bindtap="handleMoneyWrapperTap" data-index="1"> |
| | | <view class="money-wrapper"> |
| | | <text class="money-number">200</text> |
| | | <text class="money-label">元</text> |
| | | </view> |
| | | </view> |
| | | <view class="item {{activeIndex === 2 ? 'active' : ''}}" bindtap="handleMoneyWrapperTap" data-index="2"> |
| | | <view class="item{{activeIndex === 2 ? 'active' : ''}}" bindtap="handleMoneyWrapperTap" data-index="2"> |
| | | <view class="money-wrapper"> |
| | | <text class="money-number">300</text> |
| | | <text class="money-label">元</text> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="row"> |
| | | <view class="item {{activeIndex === 3 ? 'active' : ''}}" bindtap="handleMoneyWrapperTap" data-index="3"> |
| | | <view class="item{{activeIndex === 3 ? 'active' : ''}}" bindtap="handleMoneyWrapperTap" data-index="3"> |
| | | <view class="money-wrapper"> |
| | | <text class="money-number">400</text> |
| | | <text class="money-label">元</text> |
| | | </view> |
| | | </view> |
| | | <view class="item {{activeIndex === 4 ? 'active' : ''}}" bindtap="handleMoneyWrapperTap" data-index="4"> |
| | | <view class="item{{activeIndex === 4 ? 'active' : ''}}" bindtap="handleMoneyWrapperTap" data-index="4"> |
| | | <view class="money-wrapper"> |
| | | <text class="money-number">500</text> |
| | | <text class="money-label">元</text> |
| | | </view> |
| | | </view> |
| | | <view class="item {{activeIndex === 5 ? 'active' : ''}}" bindtap="handleMoneyWrapperTap" data-index="5"> |
| | | <view class="item{{activeIndex === 5 ? 'active' : ''}}" bindtap="handleMoneyWrapperTap" data-index="5"> |
| | | <view class="money-wrapper"> |
| | | <text class="money-number">600</text> |
| | | <text class="money-label">元</text> |
| | |
| | | </view> |
| | | |
| | | <view class="rechage-view"> |
| | | <view class="rechage {{activeIndex === -1 ? 'active' : ''}}"> |
| | | <text>充值</text> |
| | | <view class="rechage{{activeIndex === -1 ? 'active' : ''}}"> |
| | | <text class="rechage-text">充值</text> |
| | | </view> |
| | | </view> |
| | | <!-- |
| | | |
| | | <view class="rechageList-view"> |
| | | </view> |
| | | --> |
| | | </view> |
| | | <text class="rechageList-view-head">充值记录</text> |
| | | <scroll-view class="list-container" scroll-y="true" scroll-x="false" refresher-enabled="true" refresher-threshold="50" bindrefresherrefresh="onPullDownRefresh"> |
| | | <block wx:if="{{allRechargeList.length > 0}}" wx:for="{{allRechargeList}}" wx:key="index"> |
| | | <view class="itemList"> |
| | | <text class="item-card-text">{{item.time}}</text> |
| | | <text class="item-card-text">{{item.type}}</text> |
| | | <text class="item-card-text">{{item.morny}}</text> |
| | | </view> |
| | | </block> |
| | | <view wx:if="{{allRechargeList.length === 0}}" class="noMore-View"> |
| | | <image class="noMore-img" src="/images/no_more.svg" /> |
| | | <text class="noMore-text">没有数据</text> |
| | | </view> |
| | | </scroll-view> |
| | | |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | |
| | | /* pages/recharge/recharge.wxss */ |
| | | .base-wrapper { |
| | | background-color: #f5f5f5; |
| | | width: 100%; |
| | | height: 100vh; |
| | | overflow: hidden; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .user-wrapper { |
| | | background-color: #1890FF; |
| | | height: 20vh; |
| | | padding-left: 10rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-around; |
| | | padding-top: 20rpx; |
| | | padding-bottom: 30rpx; |
| | | } |
| | | |
| | | .user-wrapper text { |
| | | color: #fff; |
| | | margin-left: 30rpx; |
| | | } |
| | | |
| | | .money-base-wrapper { |
| | | flex-direction: column; |
| | | height: 20vh; |
| | | display: flex; |
| | | justify-content: space-around; |
| | | margin-top: 20rpx; |
| | | } |
| | | |
| | | .row { |
| | | display: flex; |
| | | justify-content: space-around; |
| | | } |
| | | |
| | | .item { |
| | | background-color: #fff; |
| | | border-radius: 5px; |
| | | width: 100%; |
| | | height: 10vh; |
| | | margin-left: 20rpx; |
| | | margin-top: 30rpx; |
| | | margin-right: 20rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .item text { |
| | | color: #2D8BF7; |
| | | } |
| | | |
| | | .money-number { |
| | | font-size: 40rpx; |
| | | } |
| | | |
| | | .money-label { |
| | | font-size: 30rpx; |
| | | margin-left: 5rpx; |
| | | } |
| | | |
| | | .itemactive { |
| | | background-color: #2D8BF7; |
| | | border-radius: 5px; |
| | | width: 100%; |
| | | height: 10vh; |
| | | margin-top: 30rpx; |
| | | margin-left: 20rpx; |
| | | margin-right: 20rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .itemactive text { |
| | | color: #fff; |
| | | } |
| | | |
| | | .money-wrapper { |
| | | display: flex; |
| | | align-items: flex-end; |
| | | /* 底部对齐 */ |
| | | justify-content: center; |
| | | /* 水平居中 */ |
| | | } |
| | | |
| | | .rechage-view { |
| | | margin-top: 40rpx; |
| | | /* 占据剩余的全部高度 */ |
| | | flex-direction: column; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | width: 100%; |
| | | } |
| | | .rechage-view text { |
| | | font-size: 30rpx; |
| | | padding-top: 10rpx; |
| | | padding-bottom: 10rpx; |
| | | } |
| | | |
| | | .rechageList-view { |
| | | margin-top: 40rpx; |
| | | width: 50%; |
| | | background-color: #fff; |
| | | display: flex; |
| | | margin-left: 20rpx; |
| | | margin-right: 20rpx; |
| | | align-items: center; |
| | | justify-content: center; |
| | | margin-top: 30rpx; |
| | | border-radius: 90px; |
| | | border: 2px solid #2D8BF7; |
| | | /* 添加蓝色的边框 */ |
| | | padding-top: 15rpx; |
| | | padding-bottom: 15rpx; |
| | | } |
| | | |
| | | .rechage { |
| | | display: flex; |
| | | width: 80%; |
| | | background-color: #2D8BF7; |
| | | align-items: center; |
| | | justify-content: center; |
| | | padding-top: 15rpx; |
| | | padding-bottom: 15rpx; |
| | | border-radius: 90px; |
| | | margin-top: 45rpx; |
| | | } |
| | | |
| | | .rechageactive { |
| | | display: flex; |
| | | margin-top: 45rpx; |
| | | align-items: center; |
| | | justify-content: center; |
| | | width: 80%; |
| | | background-color: #bababa; |
| | | padding-top: 15rpx; |
| | | padding-bottom: 15rpx; |
| | | border-radius: 90px; |
| | | } |
| | | |
| | | /* pages/recharge/recharge.wxss */ |
| | | .base-wrapper { |
| | | background-color: #f5f5f5; |
| | | width: 100%; |
| | | height: 100vh; |
| | | overflow: hidden; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | |
| | | .rechageactive text { |
| | | color: #fff; |
| | | } |
| | | |
| | | .rechage text { |
| | | color: #fff; |
| | | .user-wrapper { |
| | | background-color: #1890FF; |
| | | height: 20vh; |
| | | padding-left: 10rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-around; |
| | | padding-top: 20rpx; |
| | | padding-bottom: 30rpx; |
| | | } |
| | | |
| | | .user-wrapper text { |
| | | color: #fff; |
| | | margin-left: 30rpx; |
| | | } |
| | | |
| | | .money-base-wrapper { |
| | | flex-direction: column; |
| | | height: 20vh; |
| | | display: flex; |
| | | justify-content: space-around; |
| | | margin-top: 40rpx; |
| | | } |
| | | |
| | | .row { |
| | | display: flex; |
| | | justify-content: space-around; |
| | | } |
| | | |
| | | .item { |
| | | background-color: #fff; |
| | | border-radius: 5px; |
| | | width: 100%; |
| | | height: 10vh; |
| | | margin-left: 20rpx; |
| | | margin-top: 10rpx; |
| | | margin-right: 20rpx; |
| | | margin-bottom: 10rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .itemactive { |
| | | background-color: #1890FF; |
| | | border-radius: 5px; |
| | | width: 100%; |
| | | height: 10vh; |
| | | margin-left: 20rpx; |
| | | margin-top: 10rpx; |
| | | margin-right: 20rpx; |
| | | margin-bottom: 10rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .itemList { |
| | | background-color: #fff; |
| | | border-radius: 5px; |
| | | margin-left: 20rpx; |
| | | margin-top: 10rpx; |
| | | margin-right: 20rpx; |
| | | margin-bottom: 0rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | padding: 30rpx 20rpx; |
| | | } |
| | | |
| | | |
| | | .item text { |
| | | color: #1890FF; |
| | | } |
| | | |
| | | .money-number { |
| | | font-size: 40rpx; |
| | | } |
| | | |
| | | .money-label { |
| | | font-size: 30rpx; |
| | | margin-left: 5rpx; |
| | | } |
| | | |
| | | |
| | | |
| | | .itemactive text { |
| | | color: #fff; |
| | | } |
| | | |
| | | .money-wrapper { |
| | | display: flex; |
| | | align-items: flex-end; |
| | | /* 底部对齐 */ |
| | | justify-content: center; |
| | | /* 水平居中 */ |
| | | } |
| | | |
| | | .rechage-view { |
| | | margin-top: 40rpx; |
| | | /* 占据剩余的全部高度 */ |
| | | flex-direction: column; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | width: 100%; |
| | | } |
| | | |
| | | .rechage-view text { |
| | | font-size: 30rpx; |
| | | padding-top: 10rpx; |
| | | padding-bottom: 10rpx; |
| | | } |
| | | |
| | | .rechageList-view { |
| | | display: flex; |
| | | flex: 1; |
| | | width: 100%; |
| | | flex-direction: column; |
| | | margin-top: 10rpx; |
| | | } |
| | | |
| | | .rechage { |
| | | display: flex; |
| | | width: 80%; |
| | | background-color: #1890FF; |
| | | align-items: center; |
| | | justify-content: center; |
| | | padding-top: 15rpx; |
| | | padding-bottom: 15rpx; |
| | | border-radius: 90px; |
| | | margin-top: 45rpx; |
| | | } |
| | | |
| | | .rechageactive { |
| | | display: flex; |
| | | margin-top: 45rpx; |
| | | align-items: center; |
| | | justify-content: center; |
| | | width: 80%; |
| | | background-color: #bababa; |
| | | padding-top: 15rpx; |
| | | padding-bottom: 15rpx; |
| | | border-radius: 90px; |
| | | } |
| | | |
| | | .rechage-text { |
| | | color: #fff; |
| | | font-size: 40rpx; |
| | | } |
| | | |
| | | .rechageList-view-head { |
| | | color: #2D8BF7; |
| | | border-radius: 5px 5px 0 0; |
| | | background-color: #fff; |
| | | display: flex; |
| | | align-items: center; |
| | | /* 垂直方向居中 */ |
| | | justify-content: space-between; |
| | | /* 子元素在主轴上的对齐方式 */ |
| | | padding: 10px; |
| | | /* 容器的内边距 */ |
| | | margin-left: 20rpx; |
| | | margin-right: 20rpx; |
| | | margin-top: 20rpx; |
| | | text-align: center; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .item-card-text { |
| | | font-size: 35rpx; |
| | | } |
| File was renamed from pages/recharge/recharge.js |
| | |
| | | // pages/recharge/recharge.js |
| | | // pages/valveList/valveList.js 开关阀记录 |
| | | Page({ |
| | | |
| | | /** |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | |
| | | listData: [{ |
| | | intakeNum: "1023356646612" |
| | | }, { |
| | | intakeNum: "1023356646612" |
| | | }, { |
| | | intakeNum: "1023356646612" |
| | | }, { |
| | | intakeNum: "1023356646612" |
| | | }, { |
| | | intakeNum: "1023356646612" |
| | | }] |
| | | }, |
| | | |
| | | /** |
| New file |
| | |
| | | { |
| | | "usingComponents": {}, |
| | | "navigationBarTitleText": "开关阀记录", |
| | | "navigationBarTextStyle": "white" |
| | | } |
| New file |
| | |
| | | <!--pages/valveList/valveList.wxml 开关阀记录--> |
| | | <view> |
| | | <scroll-view class="list-container" scroll-y="true" scroll-x="false"> |
| | | <block wx:if="{{listData.length > 0}}" wx:for="{{listData}}" wx:key="index"> |
| | | <view class="list-item" wx:for="{{listData}}" wx:for-item="item" wx:for-index="index"> |
| | | <!-- <image class="item-img" src="/images/pipeline.svg" /> --> |
| | | <view class="item-time"> |
| | | <text class="item-text">消费金额:</text> |
| | | <view> |
| | | <text class="item-morny">50</text> |
| | | <text class="item-text"> 元</text> |
| | | </view> |
| | | </view> |
| | | <text class="item-text">虚拟卡编号:{{item.intakeNum}}</text> |
| | | <text class="item-text">取水口编号:</text> |
| | | <text class="item-text">开阀时间:</text> |
| | | <text class="item-text">关阀时间:</text> |
| | | <view class="item-time"> |
| | | <text class="item-text">用水时长:120 分钟</text> |
| | | <text class="item-text">用水量:2 m³</text> |
| | | </view> |
| | | |
| | | </view> |
| | | </block> |
| | | <view wx:if="{{listData.length === 0}}" class="noMore-View"> |
| | | <image class="noMore-img" src="/images/no_more.svg" /> |
| | | <text class="noMore-text">没有数据</text> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| New file |
| | |
| | | /* pages/valveList/valveList.wxss */ |
| | | .list-item { |
| | | display: flex; |
| | | flex-direction: column; |
| | | background-color: #1890FF; |
| | | margin-top: 30rpx; |
| | | margin-left: 30rpx; |
| | | margin-right: 30rpx; |
| | | margin-bottom: 30rpx; |
| | | padding: 20rpx; |
| | | border-radius: 15rpx; |
| | | } |
| | | |
| | | .item-text { |
| | | color: #fff; |
| | | font-size: 35rpx; |
| | | } |
| | | |
| | | .item-time { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: flex-end; |
| | | } |
| | | |
| | | .item-morny { |
| | | color: #FFFF00; |
| | | font-size: 50rpx; |
| | | font-weight: bold; |
| | | } |
| | |
| | | Page({ |
| | | data: { |
| | | currentTab: 0, // 当前显示的表格,默认为第一个表格 |
| | | searchQuery:"", |
| | | searchQuery: "", |
| | | commonWaterPoints: [], // 常用取水口数据 |
| | | allWaterPoints: [], // 所有取水口数据 |
| | | isRefreshing_all: false, |
| | | isRefreshing_common: false, |
| | | showConfirm: false, |
| | | waterIntakeName: "", |
| | | choseItem: null |
| | | }, |
| | | |
| | | // 切换 Tabs |
| | |
| | | currentTab: tab |
| | | }); |
| | | }, |
| | | onInput(e){ |
| | | onInput(e) { |
| | | this.setData({ |
| | | searchQuery: e.detail.value // 将输入框的值存储到 inputValue |
| | | }); |
| | |
| | | onSearch: function () { |
| | | const query = this.data.searchQuery; |
| | | if (query) { |
| | | this.getallWaterPoints(query) |
| | | this.getallWaterPoints(query) |
| | | // 在这里进行搜索操作,更新 allWaterPoints 数据 |
| | | } else { |
| | | this.getallWaterPoints(query) |
| | |
| | | * @param {} event |
| | | */ |
| | | choseCard(event) { |
| | | const intakeId= event.currentTarget.dataset.item.intakeId; |
| | | console.log(intakeId); |
| | | wx.navigateTo({ |
| | | url: '/pages/openCard/openCard?intakeId='+intakeId, |
| | | this.setData({ |
| | | showConfirm: true, |
| | | choseItem: event.currentTarget.dataset.item |
| | | }) |
| | | }, |
| | | // console.log(intakeId); |
| | | // wx.navigateTo({ |
| | | // url: '/pages/openCard/openCard?intakeId='+intakeId, |
| | | // }) |
| | | |
| | | }, |
| | | //开泵通信 |
| | | postOpenValva(intakeId) { |
| | | wx.showLoading({ |
| | | title: '正在开阀请稍候...', // 加载提示文字 |
| | | mask: true // 是否显示透明蒙层,防止触摸穿透,默认为 false |
| | | }); |
| | | const app = getApp(); |
| | | const data = { |
| | | intakeId: intakeId, //取水口ID |
| | | // vcId: vcId, //虚拟卡ID |
| | | operator: app.globalData.sessionId //操作员 |
| | | }; |
| | | post({ |
| | | url: "wx/valve/open_wx", |
| | | 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 === "1002") { |
| | | wx.showToast({ |
| | | title: '开阀失败', |
| | | icon: 'error', |
| | | duration: 3000 // 提示的持续时间,单位毫秒 |
| | | }) |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | } |
| | | , |
| | | }, |
| | | /** |
| | | * 获取所有取水口 |
| | | */ |
| | | getallWaterPoints: function (intakeNum) { |
| | | let params = { url: 'rtu/get_online_intakes' }; |
| | | let params = { |
| | | url: 'project/intake/all_intakes' |
| | | }; |
| | | if (intakeNum) { |
| | | params.data = { intakeNum: intakeNum }; |
| | | params.data = { |
| | | intakeNum: intakeNum |
| | | }; |
| | | } |
| | | |
| | | get(params) |
| | | .then((data) => { |
| | | if(data.success&&data.code==="0001"){ |
| | | this.setData({ |
| | | isRefreshing_all: false |
| | | }); |
| | | if (data.success && data.code === "0001") { |
| | | this.setData({ |
| | | allWaterPoints: data.content.obj |
| | | allWaterPoints: data.content.obj |
| | | }); |
| | | }else{ |
| | | } else { |
| | | wx.showToast({ |
| | | title: data.msg, |
| | | }) |
| | |
| | | console.log('Failed to add item:'); |
| | | }) |
| | | .catch((error) => { |
| | | this.setData({ |
| | | isRefreshing_all: false |
| | | }); |
| | | console.error('Failed to add item:', error); |
| | | }); |
| | | }, |
| | | getcommonWaterPoints(){ |
| | | |
| | | get({url:'rtu/used_intakes', data: { |
| | | operator: getApp().globalData.sessionId |
| | | }}) |
| | | .then((data) => { |
| | | if(data.success&&data.code==="0001"){ |
| | | //获取常用取水口 |
| | | getcommonWaterPoints() { |
| | | get({ |
| | | url: 'project/intake/used_intakes', |
| | | data: { |
| | | operator: getApp().globalData.sessionId |
| | | } |
| | | }) |
| | | .then((data) => { |
| | | this.setData({ |
| | | commonWaterPoints: data.content |
| | | isRefreshing_common: false |
| | | }); |
| | | }else{ |
| | | if (data.success && data.code === "0001") { |
| | | this.setData({ |
| | | commonWaterPoints: data.content |
| | | }); |
| | | } else { |
| | | wx.showToast({ |
| | | title: data.msg, |
| | | }) |
| | | } |
| | | console.log('Failed to add item:'); |
| | | }) |
| | | .catch((error) => { |
| | | this.setData({ |
| | | isRefreshing_common: false |
| | | }); |
| | | wx.showToast({ |
| | | title: data.msg, |
| | | title: error.code, |
| | | icon: 'error', |
| | | duration: 3000 // 提示的持续时间,单位毫秒 |
| | | }) |
| | | } |
| | | console.log('Failed to add item:'); |
| | | console.error('Failed to add item:', error); |
| | | }); |
| | | }, |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | | onPullDownRefresh_all() { |
| | | this.getallWaterPoints(); |
| | | }, |
| | | onPullDownRefresh_common() { |
| | | this.getcommonWaterPoints(); |
| | | }, |
| | | confirmDialog() { |
| | | this.setData({ |
| | | showConfirm:false |
| | | }) |
| | | .catch((error) => { |
| | | console.error('Failed to add item:', error); |
| | | }); |
| | | this.postOpenValva(this.data.choseItem.intakeId); |
| | | }, |
| | | closeDialog() { |
| | | this.setData({ |
| | | showConfirm: false |
| | | }) |
| | | } |
| | | |
| | | }) |
| | |
| | | "usingComponents": { |
| | | "t-avatar": "tdesign-miniprogram/avatar/avatar", |
| | | "t-switch": "tdesign-miniprogram/switch/switch", |
| | | "t-button": "tdesign-miniprogram/button/button" |
| | | "t-button": "tdesign-miniprogram/button/button", |
| | | "t-dialog": "tdesign-miniprogram/dialog/dialog" |
| | | }, |
| | | "navigationBarTitleText": "取水口", |
| | | "navigationBarTextStyle": "white" |
| | |
| | | <!--pages/waterIntake/waterIntake.wxml取水口列表--> |
| | | <view class="container"> |
| | | <!-- 顶部 Tabs --> |
| | | <view class="tabs"> |
| | |
| | | </view> |
| | | |
| | | <!-- 常用取水口 --> |
| | | <scroll-view class="list-container" wx:if="{{currentTab === 0}}" scroll-y="true" scroll-x="false"> |
| | | <block wx:if="{{commonWaterPoints.length > 0}}" wx:for="{{commonWaterPoints}}" wx:key="index"> |
| | | <scroll-view class="list-container" wx:if="{{currentTab === 0}}" scroll-y="true" refresher-enabled="true" refresher-threshold="50" bindrefresherrefresh="onPullDownRefresh_common" refresher-triggered="{{isRefreshing_common}}"> |
| | | <block wx:for="{{commonWaterPoints}}" wx:key="index"> |
| | | <view class="item"> |
| | | <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'}}" /> |
| | | </view> |
| | | <text wx:if="{{item.isOnLine}}" class="item-button" bind:tap="choseCard" data-item="{{item}}">选择</text> |
| | | <text class="item-button" bindtap="choseCard" data-item="{{item}}">开阀</text> |
| | | </view> |
| | | </block> |
| | | <view wx:if="{{commonWaterPoints.length === 0}}" class="noMore-View"> |
| | |
| | | </scroll-view> |
| | | |
| | | <!-- 所有取水口 --> |
| | | <view class="all-waterIntake" wx:else> |
| | | <view class="all-waterIntake" wx:if="{{currentTab === 1}}"> |
| | | <view class="search-container"> |
| | | <input class="search-input" placeholder="请输入取水口编码后点击搜索" bindinput="onInput" /> |
| | | <!-- <text class="search-button" >搜索</text> --> |
| | | <t-button class="search-button" theme="primary" size="large" icon="search" shape="square" aria-label="搜索" bindtap="onSearch" style="background-color: #1890FF; border: none; height: 80rpx;"></t-button> |
| | | <t-button class="search-button" theme="primary" size="large" icon="search" shape="square" aria-label="搜索" bindtap="onSearch" style="background-color: #1890FF; border: none; height: 80rpx;"></t-button> |
| | | </view> |
| | | <view> |
| | | <scroll-view class="list-container" scroll-y="true" scroll-x="false"> |
| | | <block wx:if="{{allWaterPoints.length > 0}}" wx:for="{{allWaterPoints}}" wx:key="index"> |
| | | <view class="item"> |
| | | <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'}}" /> |
| | | </view> |
| | | <text wx:if="{{item.isOnLine}}" class="item-button" bind:tap="choseCard" data-item="{{item}}">选择</text> |
| | | <scroll-view class="list-container" scroll-y="true" refresher-enabled="true" refresher-threshold="50" bindrefresherrefresh="onPullDownRefresh_all" refresher-triggered="{{isRefreshing_all}}"> |
| | | <block wx:for="{{allWaterPoints}}" wx:key="index"> |
| | | <view class="item"> |
| | | <view class="item-left"> |
| | | <text>{{item.intakeNum}}</text> |
| | | <image class="item-img" src="{{item.isOnLine ? '/images/wifi_no.svg' : '/images/wifi_off.svg'}}" /> |
| | | </view> |
| | | </block> |
| | | <view wx:if="{{allWaterPoints.length === 0}}" class="noMore-View"> |
| | | <image class="noMore-img" src="/images/no_more.svg" /> |
| | | <text class="noMore-text">没有数据</text> |
| | | <text class="item-button" bindtap="choseCard" data-item="{{item}}">开阀</text> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | </block> |
| | | <view wx:if="{{allWaterPoints.length === 0}}" class="noMore-View"> |
| | | <image class="noMore-img" src="/images/no_more.svg" /> |
| | | <text class="noMore-text">没有数据</text> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | </view> |
| | | |
| | | <t-dialog class="t-dialog" visible="{{showConfirm}}" content="确认打开{{choseItem.intakeNum}}吗?" confirm-btn="{{ { content: '确认', variant: 'base', theme: 'danger' } }}" close-on-overlay-click="false" cancel-btn="取消" bind:confirm="confirmDialog" bind:cancel="closeDialog" /> |
| | | </view> |
| | |
| | | /* pages/waterIntake/waterIntake.wxss */ |
| | | /* index.wxss */ |
| | | .container { |
| | | padding-left: 20rpx; |
| | | padding-right: 20rpx; |
| | | padding-top: 5rpx; |
| | | padding-bottom: 5rpx; |
| | | padding: 5rpx 20rpx; |
| | | background-color: #fff; |
| | | width: 100%; |
| | | height: 100vh; |
| | | overflow: hidden; |
| | | /* 防止底部区域滚动 */ |
| | | display: flex; |
| | | flex-direction: column; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .tabs { |
| | | display: flex; |
| | | justify-content: space-around; |
| | | position: relative; |
| | | width: 100%; |
| | | border-bottom: 1px solid #eee; |
| | | /* Tabs 占满整个横向屏幕 */ |
| | | } |
| | | |
| | | .tab { |
| | | font-size: 16px; |
| | | padding: 10px; |
| | | cursor: pointer; |
| | | position: relative; |
| | | width: 50%; |
| | | /* Tabs 平分整个横向屏幕 */ |
| | | text-align: center; |
| | | /* 文字居中 */ |
| | | } |
| | | |
| | | list-container |
| | | |
| | | .list { |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .item { |
| | | padding: 10px; |
| | | border-bottom: 1px solid #eee; |
| | | } |
| | | |
| | | |
| | | .search-container { |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 10rpx; |
| | | border-bottom: 1px solid #eee; |
| | | } |
| | | |
| | | /* 搜索框 */ |
| | | .search-input { |
| | | flex: 1; |
| | | height: 80rpx; |
| | | padding: 0 20rpx; |
| | | border: 1px solid #ccc; |
| | | border-radius: 20rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | |
| | | /* 搜索按钮 */ |
| | | .search-button { |
| | | display: flex; |
| | | margin-left: 10rpx; |
| | | height: 60rpx; |
| | | |
| | | background-color: #1890FF; |
| | | color: white; |
| | | border: none; |
| | | border-radius: 20rpx; |
| | | font-size: 30rpx; |
| | | text-align: center; |
| | | align-items: center; |
| | | position: relative; |
| | | } |
| | | |
| | | .list-container { |
| | | flex: 1; |
| | | overflow-y: auto; |
| | | z-index: 0; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: flex-start; |
| | | /* 确保内容居上 */ |
| | | height: 100%; |
| | | } |
| | | |
| | | .all-waterIntake { |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: flex-start; |
| | | /* 确保内容居上 */ |
| | | height: 100%; |
| | | width: 100%; |
| | | padding-bottom: 20rpx; /* 增加底部填充 */ |
| | | } |
| | | |
| | | .item { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | padding: 10px; |
| | | /* 适当调整间距 */ |
| | | padding: 15px 20rpx; |
| | | border-bottom: 1px solid #eee; |
| | | } |
| | | |
| | | .item-left { |
| | |
| | | align-items: center; |
| | | } |
| | | |
| | | .item-right { |
| | | display: flex; |
| | | align-items: center; |
| | | .item-left text{ |
| | | font-size: 40rpx; |
| | | min-width: 150rpx; |
| | | } |
| | | |
| | | .item-img { |
| | | width: 40rpx; |
| | | /* 根据需要调整图标大小 */ |
| | | height: 40rpx; |
| | | /* 根据需要调整图标大小 */ |
| | | margin-left: 20rpx; |
| | | } |
| | | |
| | | .item-button { |
| | | display: flex; |
| | | height: 60rpx; |
| | | height: 80rpx; |
| | | padding: 0 60rpx; |
| | | background-color: #1890FF; |
| | | color: white; |
| | |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .item-left text{ |
| | | font-size: 40rpx; |
| | | } |
| | | |
| | | .indicator { |
| | | width: 100%; |
| | | height: 3px; |
| | |
| | | position: absolute; |
| | | bottom: 0; |
| | | left: 0; |
| | | transform: translateX(0); |
| | | /* 初始化位置 */ |
| | | } |
| | | |
| | | .noMore-View { |
| | |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .noMore-img{ |
| | | .noMore-img { |
| | | width: 300rpx; |
| | | height: 300rpx; |
| | | } |
| | | |
| | | .noMore-text{ |
| | | color:#969494; |
| | | .noMore-text { |
| | | color: #969494; |
| | | } |
| | | |
| | | .search-container { |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 10rpx; |
| | | border-bottom: 1px solid #eee; |
| | | } |
| | | |
| | | .search-input { |
| | | flex: 1; |
| | | height: 80rpx; |
| | | padding: 0 20rpx; |
| | | border: 1px solid #ccc; |
| | | border-radius: 20rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | |
| | | .search-button { |
| | | margin-left: 10rpx; |
| | | height: 60rpx; |
| | | background-color: #1890FF; |
| | | color: white; |
| | | border: none; |
| | | border-radius: 20rpx; |
| | | font-size: 30rpx; |
| | | text-align: center; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .all-waterIntake { |
| | | width: 100%; |
| | | flex: 1; |
| | | overflow-y: auto; |
| | | z-index: 0; |
| | | display: flex; |
| | | flex-direction: column; |
| | | padding-bottom: 10rpx; /* 增加底部填充 */ |
| | | } |
| | | .t-dialog{ |
| | | --td-dialog-content-font-size:40rpx; |
| | | --td-dialog-content-line-height:50rpx |
| | | } |
| | |
| | | "projectname": "irrigate_user", |
| | | "setting": { |
| | | "compileHotReLoad": true, |
| | | "urlCheck": false |
| | | "urlCheck": true |
| | | } |
| | | } |