scanResult.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <template>
  2. <view class="page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header :title='htitle'></cus-header>
  4. <image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/06/03/ea285d8f-ad96-447e-8f4a-77d495f2fac6.png"></image>
  5. <p>{{title}}</p>
  6. <p class="tip">设备已就绪,需添加角色才能使用<br>快去创建角色吧~</p>
  7. <div class="zt_btn" @tap="addRole">为设备添加角色</div>
  8. </view>
  9. </template>
  10. <script>
  11. export default {
  12. data(){
  13. return {
  14. scanParams:'',
  15. htitle:'扫码结果',
  16. title:'扫码成功'
  17. }
  18. },
  19. onLoad(option) {
  20. if(option.scanParams) this.scanParams = JSON.parse(option.scanParams);
  21. if(option.type&&option.type=='lanya'){
  22. this.htitle = '配网结果';
  23. this.title = '配网成功';
  24. }
  25. },
  26. methods:{
  27. addRole(){
  28. uni.navigateTo({
  29. url:'/pagesRole/addRole?type=1&scanParams='+JSON.stringify(this.scanParams)
  30. })
  31. },
  32. goBack(){
  33. uni.reLaunch({
  34. url:'/pages/home'
  35. })
  36. },
  37. }
  38. }
  39. </script>
  40. <style scoped lang="less">
  41. .page{
  42. background: #FFFFFF;
  43. display: flex;
  44. flex-direction: column;
  45. align-items: center;
  46. padding: 0 60rpx;
  47. image{
  48. width: 400rpx;
  49. height: 430rpx;
  50. margin-top: 92rpx;
  51. }
  52. p{
  53. font-family: PingFang-SC, PingFang-SC;
  54. font-weight: bold;
  55. font-size: 40rpx;
  56. color: #111111;
  57. line-height: 40rpx;
  58. text-align: center;
  59. margin-top: 35rpx;
  60. &.tip{
  61. font-weight: 400;
  62. font-size: 26rpx;
  63. color: #7C8592;
  64. line-height: 41rpx;
  65. text-align: center;
  66. margin-top: 29rpx;
  67. }
  68. }
  69. .zt_btn{
  70. margin-top: 232rpx;
  71. }
  72. .qx_btn{
  73. margin-top: 60rpx;
  74. }
  75. }
  76. </style>