Commit 91063030 by LJM

bug

parent 749b4a8e
.page-user {
height: 100vh;
padding: 22rpx 24rpx 0 24rpx;
padding: 22rpx 24rpx 200rpx 24rpx;
background: linear-gradient(200deg, #d6e8ff 0%, #f5f5f7 277px);
overflow-y: auto;
.user-head {
......
......@@ -83,7 +83,7 @@
<script>
import { Ichunt_Api, Api_Url, Code_Url } from '@/util/api.js';
import { setCookie, startCountdown } from '@/util/util.js';
import { setCookie, delCookie, startCountdown } from '@/util/util.js';
export default {
data() {
return {
......@@ -206,6 +206,9 @@ export default {
this.request(Api_Url + '/login/action', 'POST', this.formParams, true, true).then(res => {
if (res.err_code === 0) {
delCookie('Yo4teW_csrf');
delCookie('Yo4teW_gid');
delCookie('Yo4teW_uid');
this.verify_flag = false;
uni.showToast({
title: '登录成功',
......
......@@ -118,8 +118,18 @@ export default {
data() {
return {};
},
onLoad() {},
methods: {}
onShow() {
this.getData();
},
methods: {
getData() {
this.request(Api_Url + '/user/getUserType', 'POST', {}, true, true).then(res => {
console.log(res);
if (res.err_code === 0) {
}
});
}
}
};
</script>
......
......@@ -113,6 +113,17 @@ const getCookie = (name) => {
}
/**
*删除cookie
*/
const delCookie = (name) => {
var exp = new Date();
exp.setTime(exp.getTime() - 1);
var cval = getCookie(name);
if (cval != null)
document.cookie = name + "=" + cval + ";expires=" + exp.toGMTString();
}
/**
* 手机验证码倒计时函数
* @param {Object} options - 配置项
* @param {number} options.duration - 倒计时时间,单位为秒,默认为60s
......@@ -161,5 +172,6 @@ module.exports = {
getPlatform,
setCookie,
getCookie,
delCookie,
startCountdown
}
\ No newline at end of file
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 sign in to comment