Commit 91063030 by LJM

bug

parent 749b4a8e
.page-user { .page-user {
height: 100vh; height: 100vh;
padding: 22rpx 24rpx 0 24rpx; padding: 22rpx 24rpx 200rpx 24rpx;
background: linear-gradient(200deg, #d6e8ff 0%, #f5f5f7 277px); background: linear-gradient(200deg, #d6e8ff 0%, #f5f5f7 277px);
overflow-y: auto; overflow-y: auto;
.user-head { .user-head {
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
<script> <script>
import { Ichunt_Api, Api_Url, Code_Url } from '@/util/api.js'; 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 { export default {
data() { data() {
return { return {
...@@ -206,6 +206,9 @@ export default { ...@@ -206,6 +206,9 @@ export default {
this.request(Api_Url + '/login/action', 'POST', this.formParams, true, true).then(res => { this.request(Api_Url + '/login/action', 'POST', this.formParams, true, true).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
delCookie('Yo4teW_csrf');
delCookie('Yo4teW_gid');
delCookie('Yo4teW_uid');
this.verify_flag = false; this.verify_flag = false;
uni.showToast({ uni.showToast({
title: '登录成功', title: '登录成功',
......
...@@ -118,8 +118,18 @@ export default { ...@@ -118,8 +118,18 @@ export default {
data() { data() {
return {}; return {};
}, },
onLoad() {}, onShow() {
methods: {} this.getData();
},
methods: {
getData() {
this.request(Api_Url + '/user/getUserType', 'POST', {}, true, true).then(res => {
console.log(res);
if (res.err_code === 0) {
}
});
}
}
}; };
</script> </script>
......
...@@ -113,6 +113,17 @@ const getCookie = (name) => { ...@@ -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 {Object} options - 配置项
* @param {number} options.duration - 倒计时时间,单位为秒,默认为60s * @param {number} options.duration - 倒计时时间,单位为秒,默认为60s
...@@ -161,5 +172,6 @@ module.exports = { ...@@ -161,5 +172,6 @@ module.exports = {
getPlatform, getPlatform,
setCookie, setCookie,
getCookie, getCookie,
delCookie,
startCountdown 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