|
@@ -1,12 +1,19 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
- <view class="username">{{username}}</view>
|
|
|
- <view v-if="msg==''">
|
|
|
- <button @click="mobileOkPcLogin()">确认登录</button>
|
|
|
- </view>
|
|
|
- <view class="msg" v-else>
|
|
|
- {{msg}}
|
|
|
+ <!-- <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>
|
|
|
|
|
@@ -18,8 +25,9 @@
|
|
|
data() {
|
|
|
return {
|
|
|
token: '',
|
|
|
- msg: '',
|
|
|
phone: '',
|
|
|
+ alertTitle: '登录成功!',
|
|
|
+ isShowAlert: false
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -30,6 +38,15 @@
|
|
|
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,
|
|
@@ -37,8 +54,7 @@
|
|
|
}).then(res => {
|
|
|
console.log(1111111111111111111)
|
|
|
console.log(res)
|
|
|
- this.msg = res.message;
|
|
|
- console.log(this.msg);
|
|
|
+ this.isShowAlert = true
|
|
|
})
|
|
|
.catch(res => {
|
|
|
uni.$u.toast(res.message);
|
|
@@ -49,16 +65,46 @@
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style>
|
|
|
- .username {
|
|
|
- text-align: center;
|
|
|
- font-size: 32rpx;
|
|
|
- line-height: 50rpx;
|
|
|
+<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;
|
|
|
}
|
|
|
|
|
|
- .msg {
|
|
|
- text-align: center;
|
|
|
- font-size: 30rpx;
|
|
|
- margin-top: 10rpx;
|
|
|
+ .btn {
|
|
|
+ border-radius: 50rpx;
|
|
|
+ width: 90%;
|
|
|
}
|
|
|
</style>
|