ebc3e072 by 华明祺

no message

1 parent 63be4379
......@@ -181,6 +181,7 @@ function getNowOpenId() {
}
function h5Login(userName) {
uni.showLoading({})
return request({
url: `/h5Login`,
method: 'post',
......@@ -189,11 +190,13 @@ function h5Login(userName) {
}
}).then((res) => {
uni.setStorageSync('token', res.data.token);
}).finally(() => {
uni.hideLoading()
})
}
function showLogin(callback) {
uni.removeStorageSync("token")
uni.removeStorageSync("userName")
uni.showModal({
title: '请输入身份证,进行身份验证',
......
......@@ -62,7 +62,10 @@ let request = function(req) {
const baseUrl = config.localPort + '/jsintszxd/request'
if (req.method === 'POST') {
req.params.userNo = token
if (token) {
req.params.userNo = token
}
url = baseUrl
data = {
appSecretId: config.appSecretId,
......@@ -90,7 +93,10 @@ let request = function(req) {
}
} else {
if (req.method === 'POST') {
req.params.userNo = token
if (token) {
req.params.userNo = token
}
data = {
jsonBody: JSON.stringify(req.params)
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!