123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- <template>
- <view>
- <!-- <view class="username">{{username}}</view> -->
- <view class="content1">
- <image src="../../static/sm.png" mode="widthFix" class="img"></image>
- <view class="row1">
- 即将通过扫码
- </view>
- <view class="row2">
- 登录畅运通网站
- </view>
- <button @click="mobileOkPcLogin()" class="row3 btn">确认登录</button>
- <button @click="mobileOkPcLogin()" class="row4 btn">取消登录</button>
- </view>
- <u-modal :show="isShowAlert" :title="alertTitle" :closeOnClickOverlay='true' :showCancelButton='true'
- confirmColor='#2772FB' @confirm="confirmClick" @close="cancelClick" @cancel="cancelClick"></u-modal>
- </view>
- </template>
- <script>
- import {
- mapState
- } from 'vuex';
- export default {
- data() {
- return {
- token: '',
- phone: '',
- alertTitle: '登录成功!',
- isShowAlert: false
- }
- },
- computed: {
- ...mapState(['hasLogin', 'userInfo', "firstAuthentication"]),
- },
- onLoad(option) {
- this.token = option.token;
- console.log(option);
- },
- methods: {
- confirmClick() {
- this.isShowAlert = false
- uni.switchTab({
- url: '/pages/mine/index'
- });
- },
- cancelClick() {
- this.isShowAlert = false
- },
- mobileOkPcLogin() {
- this.$request.baseRequest('post', '/login/loginCode', {
- phone: this.userInfo.phone,
- token: this.token
- }).then(res => {
- console.log(1111111111111111111)
- console.log(res)
- this.isShowAlert = true
- })
- .catch(res => {
- uni.$u.toast(res.message);
- });
- }
- }
- }
- </script>
- <style scoped lang="scss">
- .content1 {
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
- padding-top: 300rpx;
- }
- .img {
- width: 50%;
- }
- .row1 {
- font-size: 14rpx;
- color: #AFB3BF;
- margin: 40rpx 0 10rpx 0;
- }
- .row2 {
- font-size: 46rpx;
- font-weight: 500;
- color: #333333;
- }
- .row3 {
- margin-top: 300rpx;
- background: #2772FB;
- color: white;
- }
- .row4 {
- margin-top: 60rpx;
- background: #F1F3F6;
- color: #AFB3BF;
- }
- .btn {
- border-radius: 50rpx;
- width: 90%;
- }
- </style>
|