diff --git a/page_vip/Vip_index.vue b/page_vip/Vip_index.vue index 920498c..25fc6e2 100644 --- a/page_vip/Vip_index.vue +++ b/page_vip/Vip_index.vue @@ -1,8 +1,30 @@ <template> <view class="page"> - <u-navbar title="编号开锁" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' height='45'></u-navbar> + <u-navbar title="我的骑行卡" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' + height='45'></u-navbar> + + <view class="cont"> + <view class="card1"> + <view class="tit1"> + 电单车15天5次卡 + </view> + <view class="tit2"> + 有效期至2024-08-04 + </view> + <view class="txt3"> + 剩余次数 <span >5</span> + </view> + </view> + <view class="card2"> + </view> + <view class="card3"> + </view> + <view class="card4"> + + </view> + </view> </view> </template> @@ -13,25 +35,98 @@ bgc: { backgroundColor: '#fff' }, - sn:'', - istrue:false + sn: '', + istrue: false } }, - + methods: { - + } } </script> -<style lang="scss" > -page{ - background-color: #fff; -} -.page{ - width: 750rpx; - - - -} -</style> +<style lang="scss"> + page { + background-color: #fff; + } + + .page { + width: 750rpx; + + .cont { + display: flex; + justify-content: center; + flex-wrap: wrap; + .tit1{ + font-weight: 500; + font-size: 32rpx; + color: #FFFFFF; + } + .tit2{ + margin-top: 10rpx; + font-weight: 500; + font-size: 24rpx; + color: #FFFFFF; + } + .card1 { + position: relative; + margin-top: 18rpx; + width: 680rpx; + height: 176rpx; + background-image: url('https://lxnapi.ccttiot.com/bike/img/static/uTKFB3So9QZGTuttNGD0'); + background-size: cover; + /* 背景图片等比缩放以覆盖整个容器 */ + background-position: center; + /* 背景图片居中显示 */ + background-repeat: no-repeat; + padding: 22rpx 46rpx; + .txt3{ + position: absolute; + right: 42rpx ; + bottom: 26rpx; + } + /* 防止背景图片重复 */ + } + .card2 { + margin-top: 18rpx; + width: 680rpx; + height: 176rpx; + background-image: url('https://lxnapi.ccttiot.com/bike/img/static/uhYH4FVnYOsjGK2iky8X'); + background-size: cover; + /* 背景图片等比缩放以覆盖整个容器 */ + background-position: center; + /* 背景图片居中显示 */ + background-repeat: no-repeat; + /* 防止背景图片重复 */ + } + .card3 { + margin-top: 18rpx; + width: 680rpx; + height: 410rpx; + background-image: url('https://lxnapi.ccttiot.com/bike/img/static/uZCTchd4XbAwsmNDuGun'); + background-size: cover; + /* 背景图片等比缩放以覆盖整个容器 */ + background-position: center; + /* 背景图片居中显示 */ + background-repeat: no-repeat; + /* 防止背景图片重复 */ + } + .card4 { + margin-top: 18rpx; + width: 680rpx; + height: 410rpx; + background-image: url('https://lxnapi.ccttiot.com/bike/img/static/uiT97zPTbkZOMkGGmsAc'); + background-size: cover; + /* 背景图片等比缩放以覆盖整个容器 */ + background-position: center; + /* 背景图片居中显示 */ + background-repeat: no-repeat; + /* 防止背景图片重复 */ + } + + } + + + } +</style> \ No newline at end of file diff --git a/pages/login/login.vue b/pages/login/login.vue index 4ec7c70..e8cff5f 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -25,8 +25,12 @@ <!-- <image src="https://lxnapi.ccttiot.com/bike/img/static/uka0jHcbyy1we0qwbiov" mode=""></image> --> 快捷登录 </button> - <view class="button" style="margin-top: 20rpx;" @click="pageindex=1"> - <image src="https://lxnapi.ccttiot.com/bike/img/static/ubSJ6aNMOUfPf80iotGv" mode=""></image>手机号登录 + <!-- <view class="button" style="margin-top: 20rpx;" @click="pageindex=1"> + <image src="https://lxnapi.ccttiot.com/bike/img/static/ubSJ6aNMOUfPf80iotGv" mode=""></image> + 验证码登录 + </view> --> + <view class="tipss" @click="pageindex=1" style="width: 100%;text-align: center;margin-top: 50rpx;color: #ccc;"> + 验证码登录 </view> <!-- <view class="button1" @click="back"> 取消登录 @@ -36,6 +40,9 @@ <view class="tit"> 登录 </view> + <view class="tipsss" style="color: red;margin-top: 30rpx;"> + 内测功能,押金充值无法使用,用户请使用快捷登录 + </view> <view class="tit_li" style="margin-top: 104rpx;"> <image src="https://lxnapi.ccttiot.com/bike/img/static/u3swF9YhZbUCuhGmrMrk" mode=""></image> 手机号 diff --git a/pages_admin/admin_index.vue b/pages_admin/admin_index.vue index a977838..0e4de6e 100644 --- a/pages_admin/admin_index.vue +++ b/pages_admin/admin_index.vue @@ -319,7 +319,8 @@ this.$u.get('/app/device/info?sn=' + this.sn).then((res) => { console.log(res,'rererer'); if (res.code === 200) { - if(res.data.sn==this.areaId){ + // console.log(this.areaId,); + if(res.data.areaId==this.areaId){ uni.navigateTo({ url: '/pages_admin/order/device_detail?id=' + this.sn }) diff --git a/pages_admin/order/device_detail.vue b/pages_admin/order/device_detail.vue index d62d263..bfc3b92 100644 --- a/pages_admin/order/device_detail.vue +++ b/pages_admin/order/device_detail.vue @@ -499,7 +499,10 @@ btn(num) { this.showbtntip=false if (num == 0) { - + uni.showLoading({ + title:'加载中...' + }) + console.log('点击了....1'); this.$u.post('/appVerify/admin/unlocking?sn=' + this.sn).then((res) => { if (res.code == 200) { @@ -511,13 +514,17 @@ duration: 2000 }); }else{ + uni.hideLoading() this.bulebtn(2) } }).catch(error => { console.error("Error fetching area data:", error); }); } else if (num == 1) { - + uni.showLoading({ + title:'加载中...' + }) + console.log('点击了....2'); this.$u.post('/appVerify/admin/lock?sn=' + this.sn).then((res) => { if (res.code == 200) { // 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构 @@ -528,13 +535,16 @@ duration: 2000 }); }else{ + uni.hideLoading() this.bulebtn(3) } }).catch(error => { console.error("Error fetching area data:", error); }); } else if (num == 2) { - + uni.showLoading({ + title:'加载中...' + }) this.$u.post('/appVerify/device/offline?sn=' + this.sn).then((res) => { if (res.code == 200) { uni.showToast({ @@ -555,7 +565,9 @@ console.error("Error fetching area data:", error); }); } else if (num == 3) { - + uni.showLoading({ + title:'加载中...' + }) this.$u.post('/appVerify/device/online?sn=' + this.sn).then((res) => { if (res.code == 200) { // 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构 @@ -576,7 +588,9 @@ console.error("Error fetching area data:", error); }); } else if (num == 4) { - uni.showLoading({}) + uni.showLoading({ + title:'加载中...' + }) this.$u.post('/app/device/ring?sn=' + this.sn).then((res) => { if (res.code == 200) { uni.hideLoading() @@ -597,7 +611,9 @@ }) } else if (num == 5) { - + uni.showLoading({ + title:'加载中...' + }) this.$u.put('/appVerify/device/edit?status=0&sn=' + this.sn).then((res) => { if (res.code == 200) { uni.showToast({ @@ -616,7 +632,9 @@ }) } else if (num == 6) { - + uni.showLoading({ + title:'加载中...' + }) this.$u.put('/appVerify/device/edit?status=1&sn=' + this.sn).then((res) => { if (res.code == 200) { this.deviceInfo() @@ -639,6 +657,9 @@ this.showvehicle=true } else if (num == 8) { + uni.showLoading({ + title:'加载中...' + }) this.$u.put('/appVerify/device/reboot' + this.sn).then((res) => { if (res.code == 200) { this.deviceInfo() @@ -648,12 +669,16 @@ duration: 2000 }); } else { + uni.hideLoading() this.bulebtn(4) } }) }else if (num == 9) { + uni.showLoading({ + title:'加载中...' + }) this.$u.put('/appVerify/device/seatCushionLock?sn=' + this.sn).then((res) => { if (res.code == 200) { this.deviceInfo() diff --git a/pages_admin/worke/woke_deviceMgmt.vue b/pages_admin/worke/woke_deviceMgmt.vue index 6dce150..323b37a 100644 --- a/pages_admin/worke/woke_deviceMgmt.vue +++ b/pages_admin/worke/woke_deviceMgmt.vue @@ -95,7 +95,7 @@ <view class="bot_box"> - <view class="step1" v-if="stepindex ==0"> + <view class="step1" v-if="stepindex ==0" style="padding: 50rpx;"> <view class="step1_left"> 设备总数:<span>{{filteredList.length}}</span> </view> @@ -103,7 +103,7 @@ 批量操作 </view> </view> - <view class="step2"> + <view class="step2" v-if="stepindex ==1"> <view class="top"> <view class="top_left" @click="selectAll"> <image @@ -116,9 +116,7 @@ </view> </view> <view class="bot_btn"> - <view class="btn" @click="closestep()"> - 取消 - </view> + <!-- <view class="btn"> 返仓 </view> --> @@ -134,7 +132,9 @@ <view class="btn" @click="livehome()"> 车辆出仓 </view> - + <view class="btn" @click="closestep()"> + 退出操作 + </view> </view> </view> @@ -247,9 +247,12 @@ } }, todetail(item){ - uni.navigateTo({ - url:'/pages_admin/order/device_detail?id='+item.sn - }) + if(this.stepindex==0){ + uni.navigateTo({ + url:'/pages_admin/order/device_detail?id='+item.sn + }) + } + }, ban() { let data = { @@ -603,11 +606,11 @@ } .bot_box { - padding: 0 30rpx; + padding: 0 10rpx 0 30rpx; position: fixed; bottom: 0; width: 750rpx; - height: 232rpx; + // height: 262rpx; background: #FFFFFF; box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(0, 0, 0, 0.3); @@ -646,7 +649,7 @@ } .bot_btn { - + margin-top: 30rpx; display: flex; flex-wrap: wrap; @@ -660,11 +663,12 @@ } .btn { - margin-right: 18rpx; + margin-top: 10rpx; + margin-right: 16rpx; display: flex; align-items: center; justify-content: center; - width: 164rpx; + width: 150rpx; height: 66rpx; background: #E2F2FF; border-radius: 0rpx 0rpx 0rpx 0rpx; diff --git a/pages_adminSet/shgl.vue b/pages_adminSet/shgl.vue index a6d3f7b..1f5b6ad 100644 --- a/pages_adminSet/shgl.vue +++ b/pages_adminSet/shgl.vue @@ -17,98 +17,173 @@ <view class="phone">{{item.userName}}</view> <view class="type" v-if="item.status==1">待处理</view> <view class="type" v-if="item.status==0" style="background-color: #ccc;color: #000;">已驳回</view> + <view class="type" v-if="item.status==2" style="background-color: #77B8FD;color: #fff;">维修中</view> + <view class="type" v-if="item.status==3" style="background-color: #64B6A8;color: #fff;">已完成</view> </view> <view class="txt"> <span v-if="item.typeStr">【{{item.typeStr}}】 </span> {{item.detail}}</view> <view class="pic_cont"> - <view class="img" v-for="item in 3" :key="item"> - <image src="https://lxnapi.ccttiot.com/bike/img/static/ugvqmfB3QYujZ6SnfTia" mode=""></image> + <view class="img" v-for="(pic, idx) in parsePictures(item.picture)" :key="idx" + @click="preview(pic, item)"> + <image :src="pic" mode="aspectFill"></image> </view> </view> <view class="info_cont"> <view class="sn"> - SN:134531 + SN:{{item.sn}} </view> <view class="time"> - 提交时间:02-11 15:06:45 + 提交时间:{{item.createTime}} </view> </view> <view class="btn_cont"> - <view class="btn1"> + <view class="btn1" v-if="item.status==1" @click="pass(item)"> 生成工单 </view> - <view class="btn1"> + <view class="btn1" v-if="item.status==2"> 已生成工单 </view> - <view class="btn2"> + <view class="btn2" v-if="item.status==1" @click="unpass(item)"> 忽略 </view> </view> - <view class="tips" @click="todetail()"> + <!-- <view class="tips" @click="todetail()"> 该车故障记录> - </view> + </view> --> </view> </view> </view> </template> <script> -export default { - data() { - return { - bgc: { - backgroundColor: '#fff' - }, - sn: '', - pageNum: 1, // 当前页码 - pageSize: 20, // 每页显示条数 - list: [] // 数据列表 - }; - }, - onShow() { - this.getlist(); - }, - onReachBottom() { - // 当页面滚动到底部时,触发加载更多 - this.loadMore(); - }, - methods: { - getlist() { - let data = { - sn: this.sn, - pageSize: this.pageSize, - pageNum: this.pageNum - }; - this.$u.get('/appVerify/fault/list?', data).then((res) => { - if (res.code === 200) { - this.list = [...this.list, ...res.rows]; // 拼接新数据 - } else { - uni.showToast({ - title: res.msg, - icon: 'none', - duration: 2000 - }); - } - }).catch(error => { - console.error("Error fetching area data:", error); - }); - }, - loadMore() { - this.pageNum += 1; // 页码增加 - this.getlist(); // 调用getlist方法获取更多数据 - }, - search() { - // 搜索时重置页码并重新获取数据 - this.pageNum = 1; - this.list = []; // 清空当前列表 - this.getlist(); - }, - todetail() { - uni.navigateTo({ - url: '/pages_adminSet/shDetail' - }); - } - } -}; + export default { + data() { + return { + bgc: { + backgroundColor: '#fff' + }, + sn: '', + pageNum: 1, // 当前页码 + pageSize: 20, // 每页显示条数 + list: [] // 数据列表 + }; + }, + onShow() { + this.getlist(); + }, + onReachBottom() { + // 当页面滚动到底部时,触发加载更多 + this.loadMore(); + }, + methods: { + pass(item){ + uni.showLoading({ + title:'加载中...' + }) + let data =item + data.status=1 + this.$u.put('system/fault', data).then((res) => { + if (res.code === 200) { + uni.showToast({ + title: '操作成功', + icon: 'none', + duration: 2000 + }); + this.pageNum = 1; + this.list = []; // 清空当前列表 + this.getlist(); + } else { + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 2000 + }); + } + }).catch(error => { + console.error("Error fetching area data:", error); + }); + }, + unpass(item){ + uni.showLoading({ + title:'加载中...' + }) + let data =item + data.status=0 + this.$u.put('system/fault', data).then((res) => { + if (res.code === 200) { + uni.showToast({ + title: '操作成功', + icon: 'none', + duration: 2000 + }); + this.pageNum = 1; + this.list = []; // 清空当前列表 + this.getlist(); + } else { + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 2000 + }); + } + }).catch(error => { + console.error("Error fetching area data:", error); + }); + }, + parsePictures(pictureString) { + if (pictureString) { + return pictureString.split(','); + } + return []; + }, + preview(pic, item) { + uni.previewImage({ + current: pic, // 当前显示图片的链接 + urls: this.parsePictures(item.picture) // 需要预览的图片链接列表 + }); + }, + getlist() { + let data = { + sn: this.sn, + pageSize: this.pageSize, + pageNum: this.pageNum + }; + this.$u.get('/appVerify/fault/list?', data).then((res) => { + if (res.code === 200) { + this.list = [...this.list, ...res.rows]; // 拼接新数据 + } else { + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 2000 + }); + } + }).catch(error => { + console.error("Error fetching area data:", error); + }); + }, + loadMore() { + this.pageNum += 1; // 页码增加 + this.getlist(); // 调用getlist方法获取更多数据 + }, + search() { + clearTimeout(timerId1); + timerId1 = setTimeout(() => { + // 搜索时重置页码并重新获取数据 + this.pageNum = 1; + this.list = []; // 清空当前列表 + this.getlist(); + + + }, 500); + + }, + todetail() { + uni.navigateTo({ + url: '/pages_adminSet/shDetail' + }); + } + } + }; </script>