微信小程序适配

feasure
lld 2026-02-15 18:54:23 +08:00
parent a174606e2b
commit 077ee218b5
2 changed files with 24 additions and 13 deletions

View File

@ -16,7 +16,12 @@
</template> </template>
</uni-easyinput> </uni-easyinput>
</view> </view>
<view class="modal-input-wrap" >
<text class="modal-label"></text>
<uni-icons type="info" size="15" color="#666"/>
<text class="modal-text">可直接点击右侧扫描设备二维码<br>
如若失效亦可手动输入设备imei号</text>
</view>
<view class="modal-btn-wrap"> <view class="modal-btn-wrap">
<button class="modal-btn cancel" @click="close"></button> <button class="modal-btn cancel" @click="close"></button>
<button class="modal-btn confirm" @click="confirm"></button> <button class="modal-btn confirm" @click="confirm"></button>
@ -24,9 +29,6 @@
</view> </view>
</uni-popup> </uni-popup>
</view> </view>
</template> </template>
<script> <script>
@ -38,7 +40,12 @@ export default {
data() { data() {
return { return {
agriName: null, agriName: null,
imei:null imei:null,
formData: {
name:null,
email:null
},
rules:[]
} }
}, },
methods:{ methods:{
@ -46,14 +53,14 @@ export default {
this.$refs.addForm.close(); this.$refs.addForm.close();
}, },
confirm() { confirm() {
this.close() this.close()
}, },
open() { open() {
this.$refs.addForm.open(); this.$refs.addForm.open();
}, },
getScanCode(res){ getScanCode(res){
console.log("设备号======>",res); this.imei = res;
} }
} }
} }
@ -77,10 +84,13 @@ export default {
.modal-input-wrap { .modal-input-wrap {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 35rpx; margin-bottom: 16rpx;
font-size: 28rpx; font-size: 28rpx;
margin-left: 20rpx; margin-left: 20rpx;
} }
.modal-input-wrap:nth-child(2) {
margin-bottom: 35rpx;
}
.modal-label { .modal-label {
width: 140rpx; width: 140rpx;
color: #666; color: #666;
@ -94,7 +104,7 @@ export default {
border: 1px solid #eee; border: 1px solid #eee;
border-radius: 8rpx; border-radius: 8rpx;
padding: 0 15rpx; padding: 0 15rpx;
font-size: 28rpx; font-size: 20rpx !important;
width: 80rpx; width: 80rpx;
} }
.modal-unit { .modal-unit {
@ -120,4 +130,9 @@ export default {
background: #007aff; background: #007aff;
color: #fff; color: #fff;
} }
.modal-text {
font-size: 22rpx;
color: #6C6C6C;
margin-left: 6rpx;
}
</style> </style>

View File

@ -151,10 +151,6 @@ export default {
}, },
methods: { methods: {
handleAddAgri() { handleAddAgri() {
uni.showToast({
title: '准备添加大棚',
icon: 'none'
})
this.$refs.addAgri.open(); this.$refs.addAgri.open();
// //
// uni.navigateTo({ url: '/pages/add-agri/add-agri' }) // uni.navigateTo({ url: '/pages/add-agri/add-agri' })