wifiSuccess.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <view class="page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title='配置网络'></cus-header>
  4. <image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/06/03/e6540154-b4da-4ddd-ab9b-8f219d5c18a6.png"></image>
  5. <p>网络配置成功</p>
  6. <p class="tip">请扫描设备或说明书上的二维码<br>点击下方扫码绑定设备,<br>如您已添加过设备,可返回首页开始使用</p>
  7. <div class="zt_btn" @tap="scanDevice">扫码绑定设备</div>
  8. <div class="qx_btn" @tap="goBack">返回首页</div>
  9. </view>
  10. </template>
  11. <script>
  12. export default {
  13. data(){
  14. return {
  15. }
  16. },
  17. methods:{
  18. scanDevice(){
  19. let that = this;
  20. uni.scanCode({
  21. success: (res) => {
  22. try{
  23. let result = JSON.parse(res.result);
  24. if(res.errMsg==='scanCode:ok'){
  25. uni.navigateTo({
  26. url:'/pagesMy/scanResult?scanParams='+JSON.stringify(result)
  27. })
  28. }
  29. }catch(e){
  30. that.$showModal('扫码失败,请检查设备二维码。')
  31. }
  32. }
  33. })
  34. },
  35. goBack(){
  36. uni.reLaunch({
  37. url:'/pages/home'
  38. })
  39. }
  40. }
  41. }
  42. </script>
  43. <style scoped lang="less">
  44. .page{
  45. background: #FFFFFF;
  46. display: flex;
  47. flex-direction: column;
  48. align-items: center;
  49. padding: 0 70rpx;
  50. image{
  51. width: 213rpx;
  52. height: 163rpx;
  53. margin-top: 198rpx;
  54. }
  55. p{
  56. font-family: PingFang-SC, PingFang-SC;
  57. font-weight: bold;
  58. font-size: 40rpx;
  59. color: #111111;
  60. line-height: 40rpx;
  61. text-align: center;
  62. margin-top: 54rpx;
  63. &.tip{
  64. font-weight: 400;
  65. font-size: 28rpx;
  66. color: #7C8592;
  67. line-height: 42rpx;
  68. text-align: center;
  69. margin-top: 40rpx;
  70. }
  71. }
  72. .zt_btn{
  73. margin-top: 193rpx;
  74. }
  75. .qx_btn{
  76. margin-top: 60rpx;
  77. }
  78. }
  79. </style>