pcLogin.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <view class="pcLogins">
  3. <u-navbar :is-back="false" title="登录" :border-bottom="false" title-color="#333333" back-icon-color="#ffffff">
  4. <view class="slot-wrap">
  5. <image src="/static/logo2.png" style="width: 178rpx;height: 31rpx;margin-left: 30rpx;"></image>
  6. </view>
  7. </u-navbar>
  8. <u-line color="#D6D6DB" />
  9. <view class="contents">
  10. <!-- 正文内容 -->
  11. <text>登录后您可在网页端继续浏览课程</text>
  12. <view class="login_bt" @click="pcLogin()">微信登录</view>
  13. </view>
  14. </view>
  15. </template>
  16. <script>
  17. export default {
  18. data() {
  19. return {
  20. scanCode: '', // 获取扫码的路径最后面的6位标识码
  21. }
  22. },
  23. onLoad(query) {
  24. console.log('扫描参数', query)
  25. const q = decodeURIComponent(query.q)
  26. this.scanCode = q.substring(q.length - 6)
  27. // const time = parseInt(query.scancode_time)
  28. console.log('扫描后得:', q, this.scanCode)
  29. },
  30. methods: {
  31. pcLogin() {
  32. console.log('跳转')
  33. uni.navigateTo({
  34. url: '/pages4/login/login?scanCode=' + this.scanCode
  35. });
  36. },
  37. }
  38. }
  39. </script>
  40. <style lang="scss" scoped>
  41. .contents {
  42. width: 100%;
  43. height: 100%;
  44. text-align: center;
  45. .login_bt {
  46. width: 180rpx;
  47. height: 80rpx;
  48. line-height: 80rpx;
  49. text-align: center;
  50. background: #ddd;
  51. }
  52. }
  53. </style>