Эх сурвалжийг харах

H5:设置登录过期时间

panyong 3 жил өмнө
parent
commit
829eeac978

+ 2 - 2
htmldev/dashboard/src/login/index.vue

@@ -176,8 +176,8 @@ export default {
             this.$store.commit('common/UPDATE_PHONE', phone)
             this.$store.commit('common/UPDATE_TOKEN', token)
 
-            this.$cookie.set('afhousephone', phone, '30d')
-            this.$cookie.set('afhousetoken', token, '30d')
+            this.$cookie.set('afhousephone', phone, { expires: '30D' })
+            this.$cookie.set('afhousetoken', token, { expires: '30D' })
           })
 
           Toast({

+ 1 - 1
htmldev/dashboard/src/utils/index.js

@@ -52,7 +52,7 @@ export function getCookieValue (name) {
 export function updateWechatToken () {
   const wechatToken = getQueryString('wechatToken') || ''
   if (wechatToken && platform.isWeixin) {
-    Vue.cookie.set('afhousewechatToken', wechatToken)
+    Vue.cookie.set('afhousewechatToken', wechatToken, { expires: '30D' })
   }
 }