Commit b2059fcb by limin

go 没有参数 跳转错误问题

1 parent 9614fd29
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: limin * @Author: limin
* @Date: 2021-07-15 15:46:53 * @Date: 2021-07-15 15:46:53
* @LastEditors: limin * @LastEditors: limin
* @LastEditTime: 2021-07-22 11:14:03 * @LastEditTime: 2021-07-22 18:08:14
* @FilePath: \account\js\load.js * @FilePath: \account\js\load.js
*/ */
;(function load() { ;(function load() {
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
function go(module, page, params) { function go(module, page, params) {
var _p = genurl(params) var _p = genurl(params)
var href = '/html/' + module + '/' + page + '.html' var href = '/html/' + module + '/' + page + '.html'
window.location.href = href + '?' + _p window.location.href = _p ? href + '?' + _p : href
} }
function loadLayConfig() { function loadLayConfig() {
layui.config({ layui.config({
...@@ -61,7 +61,7 @@ function loadConfig() { ...@@ -61,7 +61,7 @@ function loadConfig() {
} }
function genurl(param, key, encode) { function genurl(param, key, encode) {
if (!param) return '' if (!param || layui.$.isEmptyObject(param)) return ''
var params = [] var params = []
var t = typeof param var t = typeof param
if (t == 'string' || t == 'number' || t == 'boolean') { if (t == 'string' || t == 'number' || t == 'boolean') {
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
if (result.code == '0') { if (result.code == '0') {
var sessionId = result.data.sessionId var sessionId = result.data.sessionId
helper.store.set('token', sessionId) helper.store.set('token', sessionId)
go('employee', 'index') go('employee', 'detail')
} }
}) })
return false return false
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!