scan.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <template>
  2. <view class="page" :style="{'height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title='欢迎' backUrl="/pages/home"></cus-header>
  4. <div class="text">欢迎进入创衡汇AI智能教练小程序<br>该页面正在紧锣密鼓建设中,敬请期待~</div>
  5. </view>
  6. </template>
  7. <script>
  8. export default {
  9. data(){
  10. return {
  11. }
  12. },
  13. onLoad(options) {
  14. if(options.q){
  15. try{
  16. console.log("扫码进入参数:", options.q);
  17. const decodedUrl = decodeURIComponent(qrString);
  18. console.log("decodedUrl:", decodedUrl);
  19. const codeMatch = decodedUrl.match(/code=([^&]+)/);
  20. console.log("codeMatch:", codeMatch);
  21. const stationCode = codeMatch ? codeMatch[1] : null;
  22. console.log("stationCode:", stationCode);
  23. }catch(e){
  24. //TODO handle the exception
  25. console.log(e,'e');
  26. }
  27. }
  28. },
  29. methods:{
  30. }
  31. }
  32. </script>
  33. <style scoped lang="less">
  34. .page{
  35. .text{
  36. font-size: 32rpx;
  37. color: #333333;
  38. line-height: 50rpx;
  39. letter-spacing: 2rpx;
  40. padding: 300rpx 60rpx 0;
  41. text-align: center;
  42. }
  43. }
  44. </style>