Commit 3d76811a by sunerhu

1.退出登录修改

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