wifiSuccess.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. <template v-if="type=='jpw'">
  6. <p>网络配置成功,快去体验吧~</p>
  7. <div class="zt_btn" @tap="goBack">返回首页</div>
  8. </template>
  9. <template v-else>
  10. <p>网络配置成功</p>
  11. <p class="tip">请扫描设备或说明书上的二维码<br>点击下方扫码绑定设备</p>
  12. <div class="zt_btn" @tap="scanDevice">扫码绑定设备</div>
  13. </template>
  14. </view>
  15. </template>
  16. <script>
  17. export default {
  18. data(){
  19. return {
  20. type:''
  21. }
  22. },
  23. onLoad(option) {
  24. this.type = option.pwtype||'';
  25. },
  26. methods:{
  27. scanDevice(){
  28. let that = this;
  29. uni.scanCode({
  30. success: (res) => {
  31. try{
  32. let result = JSON.parse(res.result);
  33. if(res.errMsg==='scanCode:ok'){
  34. uni.navigateTo({
  35. url:'/pagesMy/scanResult?scanParams='+JSON.stringify(result)
  36. })
  37. }
  38. }catch(e){
  39. that.$showModal('扫码失败,请检查设备二维码。')
  40. }
  41. }
  42. })
  43. },
  44. goBack(){
  45. uni.reLaunch({
  46. url:'/pages/home'
  47. })
  48. }
  49. }
  50. }
  51. </script>
  52. <style scoped lang="less">
  53. .page{
  54. background: #FFFFFF;
  55. display: flex;
  56. flex-direction: column;
  57. align-items: center;
  58. padding: 0 70rpx;
  59. image{
  60. width: 213rpx;
  61. height: 163rpx;
  62. margin-top: 198rpx;
  63. }
  64. p{
  65. font-family: PingFang-SC, PingFang-SC;
  66. font-weight: bold;
  67. font-size: 40rpx;
  68. color: #111111;
  69. line-height: 40rpx;
  70. text-align: center;
  71. margin-top: 54rpx;
  72. &.tip{
  73. font-weight: 400;
  74. font-size: 28rpx;
  75. color: #7C8592;
  76. line-height: 42rpx;
  77. text-align: center;
  78. margin-top: 40rpx;
  79. }
  80. }
  81. .zt_btn{
  82. margin-top: 193rpx;
  83. }
  84. .qx_btn{
  85. margin-top: 60rpx;
  86. }
  87. }
  88. </style>