<template> <view class="page"> <u-navbar title="编号开锁" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'height='36'></u-navbar> <view class="cont"> <view class="tit"> 输入编号开锁 </view> <view class="img"> <image src="https://api.ccttiot.com/smartmeter/img/static/udApqNjNoUrCp1zl5Eef" mode=""></image> </view> <view class="ipt"> <input type="text" class="ips" v-model="code" placeholder="请输入车辆二维码下方编号" placeholder-style='font-weight: 400;font-size: 36rpx;color: #808080;' /> </view> <view class="btn" @click="sub"> 确认开锁 </view> </view> </view> </template> <script> export default { data() { return { bgc: { backgroundColor: "#fff", }, code:'' } }, methods: { sub(){ if(this.code==''){ uni.showToast({ title: '请输入设备编号', icon: 'none', duration: 2000 }); }else{ uni.navigateTo({ url:'/pages/index/index?sn='+this.code }) } } } } </script> <style lang="scss" > page{ background-color: #fff; } .page{ width: 750rpx; .cont{ width: 100%; display: flex; justify-content: center; flex-wrap: wrap; .tit{ margin-top: 94rpx; font-weight: 500; font-size: 48rpx; color: #3D3D3D; } .img{ margin-top: 28rpx; width: 726rpx; height: 246rpx; image{ width: 726rpx; height: 246rpx; } } .ipt{ margin-top: 42rpx; width: 658rpx; height: 80rpx; background: #F3F3F3; border-radius: 0rpx 0rpx 0rpx 0rpx; border: 2rpx solid rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; .ips{ width: 80%; } } .btn{ margin-top: 100rpx; display: flex; align-items: center; justify-content: center; width: 658rpx; height: 86rpx; background: #808080; border-radius: 20rpx 20rpx 20rpx 20rpx; font-weight: 400; font-size: 36rpx; color: #FFFFFF; } } } </style>