|
|
|
@ -26,6 +26,11 @@ |
|
|
|
<uni-search-bar class="my-search-box" @confirm="search" @input="input" cancel-button="none"></uni-search-bar> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="verify" v-if="showVerify ==true" > |
|
|
|
<label @click="close()" class="close-button"></label> |
|
|
|
<uni-easyinput type="text" v-model="validateCode" placeholder="请输入场景码"/> |
|
|
|
<button class="uni-button" size="mini" type="" @click="verifyMethod()">确定</button> |
|
|
|
</view> |
|
|
|
<!-- 场景区域 --> |
|
|
|
<view class="nav-list"> |
|
|
|
<view class="nav-item" v-for="(item, i) in sceneList" :key="i" @click="navClickHandler(item)"> |
|
|
|
@ -55,8 +60,11 @@ |
|
|
|
}, |
|
|
|
time:1, |
|
|
|
total:0, |
|
|
|
showVerify:false, |
|
|
|
validateCode:null, |
|
|
|
search: false, |
|
|
|
isloading:false, |
|
|
|
item:null, |
|
|
|
//轮播图数据列表 |
|
|
|
swiperList: [], |
|
|
|
//场景数据列表 |
|
|
|
@ -125,11 +133,29 @@ |
|
|
|
}, |
|
|
|
navClickHandler(item) { |
|
|
|
if(item !== ""){ |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/subpkg/role/role?guid=' + item.guid+'&name='+item.name |
|
|
|
}) |
|
|
|
if(this.queryObj.isOpen == 1){ |
|
|
|
this.showVerify = true |
|
|
|
this.item = item |
|
|
|
} else{ |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/subpkg/role/role?guid=' + item.guid+'&name='+item.name |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
close(){ |
|
|
|
this.showVerify = false |
|
|
|
}, |
|
|
|
verifyMethod(){ |
|
|
|
if (this.validateCode == null){ |
|
|
|
return uni.showToast({title:'场景码不能为空',icon:'none'}) |
|
|
|
} else if(parseInt(this.validateCode)!== this.item.code){ |
|
|
|
return uni.showToast({title:'场景码错误',icon:'none'}) |
|
|
|
} |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/subpkg/role/role?guid=' + this.item.guid+'&name='+this.item.name |
|
|
|
}) |
|
|
|
}, |
|
|
|
input(e){ |
|
|
|
clearTimeout(this.timer) |
|
|
|
|
|
|
|
@ -231,5 +257,61 @@ |
|
|
|
.uni-searchbar__box { |
|
|
|
border: 1px solid #ddd; |
|
|
|
} |
|
|
|
.verify { |
|
|
|
border-radius: 10px; |
|
|
|
background-color: #c0b9e1; |
|
|
|
opacity: 0.9; |
|
|
|
position: absolute; |
|
|
|
top: 45%; |
|
|
|
left: 50%; |
|
|
|
-webkit-transform: translate(-50%, -50%); |
|
|
|
transform: translate(-50%, -50%); |
|
|
|
width: 400rpx; |
|
|
|
height: 300rpx; |
|
|
|
padding: 30rpx; |
|
|
|
z-index: 9999; |
|
|
|
} |
|
|
|
|
|
|
|
.uni-button { |
|
|
|
margin-top: 40rpx; |
|
|
|
font-size: 30rpx; |
|
|
|
width: 100%; |
|
|
|
height: 70rpx; |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
justify-content: center; |
|
|
|
background: #1367fe; |
|
|
|
border-radius: 50rpx; |
|
|
|
color: #fff; |
|
|
|
line-height: 70rpx; |
|
|
|
} |
|
|
|
.close-button { |
|
|
|
position: absolute; |
|
|
|
top: -60rpx; |
|
|
|
right: -10rpx; |
|
|
|
width: 50rpx; |
|
|
|
height: 50rpx; |
|
|
|
background-color: rgba(255, 255, 255, .5); |
|
|
|
border: 1rpx solid rgba(255, 255, 255, .7); |
|
|
|
border-radius: 50%; |
|
|
|
transform: rotate(45deg); |
|
|
|
} |
|
|
|
|
|
|
|
.close-button:before, |
|
|
|
.close-button:after { |
|
|
|
content: ''; |
|
|
|
position: absolute; |
|
|
|
top: 50%; |
|
|
|
left: 50%; |
|
|
|
background: #333; |
|
|
|
border-radius: 50%; |
|
|
|
transform: translate(-50%, -50%); |
|
|
|
height: 24rpx; |
|
|
|
width: 4rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.close-button:after { |
|
|
|
height: 4rpx; |
|
|
|
width: 24rpx; |
|
|
|
} |
|
|
|
</style> |
|
|
|
|