Commit 3d76811a by sunerhu

1.退出登录修改

2.登录页面忘记密码增加的返回按钮
parent a44a6cbc
<template>
<view class="wrapper">
<view v-if="loginType=='resetpw'" @click="rpsdlogin()" class="psdlogin">
<image style="width: 40rpx;height: 40rpx;" src="../../static/rpsloging.png" mode=""></image>
</view>
<view class="logo">
<image :src="imgSrc" alt="logo" srcset="" class="iconBox" mode="widthFix"></image>
<view>欢迎登录使用CFFP</view>
......@@ -101,6 +104,9 @@
}
},
methods: {
rpsdlogin(){
this.loginType= 'codelogin'
},
getFile(type){
uni.navigateTo({
url:`/components/clause/clause?type=${type}`
......@@ -331,6 +337,12 @@
</script>
<style lang="scss">
.psdlogin{
margin: 40rpx;
width: 40rpx;
height: 40rpx;
// background: url('../../static/rpsloging.png') no-repeat;
}
.wrapper{
background: #20279B;
overflow: auto;
......
......@@ -76,7 +76,6 @@
<view @click="open(item, i)" style="flex: 1;" v-else>
<text>{{item.name}}</text>
</view> -->
</view>
<!-- <text v-else class=""></text> -->
......
......@@ -30,7 +30,9 @@
<!-- 课程详情图 -->
<view class="courseTitleContent">
<view class="courseTitle">
<h4>{{courseInfo.fileTitle}}</h4>
<view class="" style="width: 70%;">
<h4>{{courseInfo.fileTitle}}</h4>
</view>
<view class="shareF">
<view class="awakenApp" @click="jumpapp()" v-if="coursesharing == 1">
<view class="" style="width: 50rpx; height: 50rpx;">
......@@ -111,6 +113,7 @@
<view class="buyBox" @click="saveOrder()" v-if="courseInfo.status == 1">
<text>{{loginType=='visitor' ? '登录/注册' : '购买'}}</text>
</view>
</view>
</view>
<boot-page v-if="sharelogin" ref="sharelogin" @close="close"></boot-page>
......@@ -178,7 +181,7 @@
// uni.setStorageSync('cffp_userId', this.userId);
localStorage.setItem('h5_userId', this.userId)
this.coursesharing = null
this.getuserRead()
this.getuserRead(1)
} else {
this.sharelogin = false
}
......@@ -252,7 +255,6 @@
url: '/components/login/login'
})
} else {
// let h5userId = uni.getStorageSync('h5_userId')
if (this.coursesharing == '1') {
this.h5jump()
} else {
......@@ -262,7 +264,6 @@
},
h5jump() {
let h5userId = localStorage.getItem('h5_userId')
console.log(h5userId, 26251)
if (h5userId) {
this.jumppurchase()
} else {
......@@ -469,7 +470,7 @@
}
},
// 用户阅读
getuserRead() {
getuserRead(type) {
let UserReadRequestVO = {
userId: this.userId ? this.userId : '',
serialsNo: this.serialsNo || 1,
......@@ -479,10 +480,9 @@
api.userRead(UserReadRequestVO).then(res => {
if (res['success']) {
this.shareReadId = res.data.id
if (uni.getStorageSync('h5_userId')) {
if (type == 1) {
this.jumppurchase()
}
}
})
},
......@@ -511,7 +511,7 @@
let endTime = Date.parse(new Date()) / 1000;
let startTime = localStorage.getItem('h5_startTime')
if (endTime - startTime > 3600 * 24) {
this.userId = ''
localStorage.setItem('h5_userId', '')
}
uni.setStorageSync('h5_coursesharing', this.coursesharing);
// this.getshareData()
......
<template>
<view>
<menu-list v-if="menuList != 'undefined '" :menuList="minorMenuLists"></menu-list>
<view style="display: flex;flex-direction: column;">
<view>
<menu-list v-if="menuList != 'undefined '" :menuList="minorMenuLists"></menu-list>
</view>
<view class="footer">
<view class="foter-btn">
<button class="btn" @click="outLing()">退出登录</button>
</view>
</view>
</view>
</template>
<script>
......@@ -37,9 +46,45 @@ import MenuList from "@/components/menuList/menuList.vue"
},
]
}
}
},
methods:{
outLing(){
uni.showModal({
title: '退出登录',
content: '确定要退出登录吗?',
showCancel: true,
success: function(res) {
if (res.confirm) {
uni.clearStorageSync();
uni.reLaunch({
url:'/components/login/login'
})
uni.showToast({
title: '操作成功',
icon: 'none'
});
} else {
console.log('已取消')
}
}
});
},
},
}
</script>
<style>
<style scoped>
.footer{
width: 100vw;
position: fixed;
bottom: 40rpx;
}
.foter-btn{
padding: 0 20rpx;
}
.btn{
background: #20269B;
border-radius: 40rpx;
}
</style>
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