diff --git a/pages/adminHome/index.vue b/pages/adminHome/index.vue index d114d40..db4ea4f 100644 --- a/pages/adminHome/index.vue +++ b/pages/adminHome/index.vue @@ -13,18 +13,18 @@ {{ form.regionCount }} - - 子区域数量 + + 子区域数量 {{ form.areaCount }} - - 已绑定子区域数 + + 已绑定子区域数 {{ form.bindnfc }} - - 未绑定子区域数 + + 未绑定子区域数 {{ form.noBindnfc }} @@ -64,6 +64,27 @@ export default { console.log('%c%s', 'color:red', 'onSHow') }, methods: { + // 跳转 + toPageFn(type){ + if(type === 1){ + uni.setStorageSync('search', 1) + uni.switchTab({ + url: '/pages/adminNfc/index?type=1' + }) + } + if(type === 2){ + uni.setStorageSync('search', 2) + uni.switchTab({ + url: '/pages/adminNfc/index?type=2' + }) + } + if(type === 3){ + uni.setStorageSync('search', 3) + uni.switchTab({ + url: '/pages/adminNfc/index?type=3' + }) + } + }, async getDataFn() { const res = await GetHomeDataApi() console.log(res, '首页数据') diff --git a/pages/adminNfc/components/bindDialog.vue b/pages/adminNfc/components/bindDialog.vue index 8433cbc..9510014 100644 --- a/pages/adminNfc/components/bindDialog.vue +++ b/pages/adminNfc/components/bindDialog.vue @@ -37,7 +37,7 @@ 1.请将标签卡贴靠设备NFC识别处! - 2.如果确定将该卡片写入该区域,请将标签卡贴靠设备xNFC识别处,否则请退出! + 2.如果确定将该卡片写入该区域,请将标签卡贴靠设备NFC识别处,否则请退出! 3.请再次将标签卡贴靠设备NFC识别处! diff --git a/pages/adminNfc/index.vue b/pages/adminNfc/index.vue index 8d3f334..8d27441 100644 --- a/pages/adminNfc/index.vue +++ b/pages/adminNfc/index.vue @@ -6,7 +6,7 @@ 已绑定子区域数 {{ form.bindnfc }} - + 未绑定子区域数 {{ form.noBindnfc }} @@ -15,8 +15,9 @@ - - + + + 搜索 {{ selectVal }} @@ -104,10 +105,26 @@ export default { mounted() { uni.hideLoading() // 关闭 Loading }, - onLoad() { + onLoad(e) { + console.log(e, 'e---') this.getAreaFn() }, - onShow() { + onShow(e) { + console.log(e, 'e---onshow') + const searchType = uni.getStorageSync('search') + console.log(searchType, 'searchType---') + if (searchType === 1) { + this.selectVal = '筛选' + this.getAreaFn() + } + if (searchType === 2) { + this.selectVal = '已绑定' + this.getAreaFn() + } + if (searchType === 3) { + this.selectVal = '未绑定' + this.getAreaFn() + } this.getDataFn() console.log('%c%s', 'color:red', 'onSHow') }, @@ -117,6 +134,7 @@ export default { uni.$emit('reset') return true }, + dialogShowFn(row) { // console.log(this.vuex_userData.nfcwrite) // return @@ -294,7 +312,7 @@ export default { .search-icon { position: absolute; - right: 210rpx; + left: 320rpx; top: 50%; transform: translateY(-50%); } @@ -303,7 +321,21 @@ export default { background-color: white; border-radius: 50rpx; } + .btn{ + margin-left:20rpx; + width: 120rpx; + height: 60rpx; + line-height: 60rpx; + border-radius: 20rpx; + text-align: center; + } + .btn-search { + } + .btn-cancel { + background-color: white; + border: 1px solid transparent; + } .select-box { display: flex; justify-content: center; diff --git a/pages/login/login.vue b/pages/login/login.vue index 162b0c6..33e2f56 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -24,8 +24,8 @@ import { loginApi } from '@/api/apiList' export default { data() { return { - phone: '13800457777', - pwd: '1a2b3c' + phone: '18174010566', + pwd: '000000' } }, mounted() { diff --git a/uni_modules/uview-ui/components/u-input/u-input.vue b/uni_modules/uview-ui/components/u-input/u-input.vue index 94b05f2..eb59a89 100644 --- a/uni_modules/uview-ui/components/u-input/u-input.vue +++ b/uni_modules/uview-ui/components/u-input/u-input.vue @@ -335,6 +335,7 @@ export default { }, onClear(event) { this.$emit('input', ''); + this.$emit('clear', ''); }, inputClick() { this.$emit('click');