Commit dc3fe3e0 authored by Xuguangxing's avatar Xuguangxing

feat: 修复token传值问题,解决小程序多个H5页面重复登录

parent ee2a7b9f
...@@ -280,8 +280,8 @@ export default class Activity extends Mixins(TransformStyleMixin, BottomNavStyle ...@@ -280,8 +280,8 @@ export default class Activity extends Mixins(TransformStyleMixin, BottomNavStyle
// 添加或修改url中的参数 // 添加或修改url中的参数
addOrEditUrlParams(url, paramName, replaceWith) { addOrEditUrlParams(url, paramName, replaceWith) {
if (url.indexOf(paramName) > -1) { if (url.indexOf(paramName) > -1) {
const re = /(' + paramName + '=)([^&]*)/gi; const re = new RegExp(paramName + '=[^&]*', 'gi')
url = url.replace(re, paramName + '=' + replaceWith); return url.replace(re, paramName + '=' + replaceWith)
} else { } else {
const paraStr = paramName + '=' + replaceWith; const paraStr = paramName + '=' + replaceWith;
const idx = url.indexOf('?'); const idx = url.indexOf('?');
......
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