Commit ce0848b2 authored by 罗超's avatar 罗超

2

parent bd23b168
......@@ -11,13 +11,13 @@
<view
style="width: 70vw;background: #FFF;display: flex;flex-direction: column;align-items: center;padding-bottom: 20px;border-radius: 8px;">
<view
style="width: 100%;height: 45px;display: flex;align-items: center;justify-content: center;border-bottom: 1px solid #EBEBEB;">
style="width: 100%;height: 45px;display: flex;align-items: center;justify-content: center;border-bottom: 1px solid #EBEBEB;color: #111111;">
手机号授权
</view>
<image :src="obj.Photo" style="width: 120rpx;height: 120rpx;border-radius: 50%;margin-top: 15px;">
</image>
<text style="margin-top: 15px;font-size: 18px;font-weight: bold;">{{obj.Name}}</text>
<text style="margin-top: 5px;font-size: 13px;">申请获取您微信绑定的手机号码</text>
<text style="margin-top: 15px;font-size: 18px;font-weight: bold;color: #111111;">{{obj.Name}}</text>
<text style="margin-top: 5px;font-size: 13px;color: #111111;">申请获取您微信绑定的手机号码</text>
<view class="btn">获取手机号
<button type="default" open-type="getPhoneNumber" v-if="showLogin == true"
style="position: absolute;left: 0;top: 0;width: 100%;height: 100%;opacity: 0;"
......@@ -65,7 +65,6 @@
wx.getUserProfile({
desc: "用于完善资料", // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: (info) => {
// console.log(info);
data.obj.Name = info.userInfo.nickName;
data.obj.Photo = info.userInfo.avatarUrl;
data.showPhone = true; //显示获取手机号码弹窗
......@@ -208,8 +207,8 @@
<style scoped>
.indexassembly {
width: 110rpx;
height: 60rpx;
line-height: 60rpx;
height: 90rpx;
line-height: 90rpx;
position: relative;
}
......@@ -221,8 +220,8 @@
opacity: 0;
left: 0;
top: 0;
width: 110rpx;
height: 60rpx;
width: 280rpx;
height: 90rpx;
}
......
......@@ -23,10 +23,14 @@
<view class="phoneBtn flex flex_center_center" @click="show=true">游客登录</view>
<!-- <button class="phoneBtn flex flex_center_center" open-type="getPhoneNumber" @getphonenumber="getphonenumber" @click="login2">手机号一键登录</button> -->
</view>
<!-- <view class="auth" @click="authLogin"> 授权手机号一键登录 </view> -->
<view class="btnBox" style="margin:20rpx auto 0;">
<indexassembly @success='againdata' >
<view class="loginBtn flex flex_center_center" style="background-color:#4C50E7;">授权登录</view>
</indexassembly>
</view>
<van-toast id="van-toast" />
<van-dialog :show='show' title="标题" message='游客登录,不能使用全部功能!' show-cancel-button @cancel='show = false'
<van-dialog :show='show' title="提示" message='游客登录,不能使用全部功能!' show-cancel-button @cancel='show = false'
@confirm='login3'>
</van-dialog>
......@@ -53,8 +57,11 @@
import {
Dialog
} from '../../wxcomponents/vant/dialog/index';
import indexassembly from '../index/components/indexassembly.vue'
export default {
components:{
indexassembly
},
setup(props, context) {
let {
proxy
......@@ -169,7 +176,6 @@
},
async login3() { //游客登录
data.show = false
console.log(uni.getStorageSync("temporarydh"))
let temporarydh = uni.getStorageSync("temporarydh")
if (temporarydh) {
let msg = {
......@@ -195,18 +201,23 @@
} else {
uni.showToast({
icon: "none",
title:"请先点击首页登录按钮授权",
title:"请先点击授权登录按钮授权",
duration:2000,
})
setTimeout(()=>{
uni.reLaunch({
url: '/pages/index/index' //没有授权登录
});
},1500)
// setTimeout(()=>{
// uni.reLaunch({
// url: '/pages/index/index' //没有授权登录
// });
// },1500)
}
}
},
againdata() {
uni.reLaunch({
url: '/pages/index/index'
});
},
};
onMounted(() => {});
let that = methods;
......
......@@ -32,7 +32,10 @@ let request = (param) => {
duration: 2000,
icon: "none",
});
uni.clearStorageSync();
uni.removeStorageSync('userInfo');
uni.reLaunch({
url:"/pages/login/login"
})
reject()
}else{
uni.showToast({
......
......@@ -39,7 +39,7 @@ let request = (param) => {
duration: 2000,
icon: "none",
});
uni.clearStorageSync();
uni.removeStorageSync('userInfo');
}
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment