123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <template>
- <view class="pcLogins">
- <u-navbar :is-back="false" title="登录" :border-bottom="false" title-color="#333333" back-icon-color="#ffffff">
- <view class="slot-wrap">
- <image src="/static/logo2.png" style="width: 178rpx;height: 31rpx;margin-left: 30rpx;"></image>
- </view>
- </u-navbar>
- <u-line color="#D6D6DB" />
- <view class="contents">
- <!-- 正文内容 -->
- <image class="logo" src="/static/me/logo.png" style="width: 360rpx;height: 72rpx;"></image>
- <text>登录后您可在网页端继续浏览课程</text>
- <view class="login_bt" @click="pcLogin()">微信登录</view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- scanCode: '', // 获取扫码的路径最后面的6位标识码
- }
- },
- onLoad(query) {
- const q = decodeURIComponent(query.q)
- this.scanCode = q.substring(q.length - 6)
- // const time = parseInt(query.scancode_time)
- console.log('扫描后得:', q, this.scanCode)
- // 扫描二维码后调用,小程序已扫码
- if (this.scanCode) {
- console.log('进入扫码后的接口')
- this.$api.scanhasCode({scanCode: this.scanCode}).then((res) => {
- console.log('调用扫码接口返回的:', res)
- if (res.data.code == 200) {
- console.log('扫码成功')
- }
- })
- }
- },
- methods: {
- pcLogin() {
- uni.navigateTo({
- url: '/pages4/login/login?scanCode=' + this.scanCode
- });
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .contents {
- width: 100%;
- height: 100%;
- text-align: center;
- display: flex;
- flex-direction: column;
- align-items: center;
- .logo {
- margin: 90rpx 0rpx 250rpx;
- }
- >text {
- font-size: 22rpx;
- color: #666;
- }
- .login_bt {
- width: 400rpx;
- height: 70rpx;
- line-height: 70rpx;
- text-align: center;
- background: #09ba08;
- color: #fff;
- font-size: 28rpx;
- border-radius: 35rpx;
- margin-top: 20rpx;
- }
- }
- </style>
|