Commit ce0848b2 authored by 罗超's avatar 罗超

2

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