ebc3e072 by 华明祺

no message

1 parent 63be4379
...@@ -181,6 +181,7 @@ function getNowOpenId() { ...@@ -181,6 +181,7 @@ function getNowOpenId() {
181 } 181 }
182 182
183 function h5Login(userName) { 183 function h5Login(userName) {
184 uni.showLoading({})
184 return request({ 185 return request({
185 url: `/h5Login`, 186 url: `/h5Login`,
186 method: 'post', 187 method: 'post',
...@@ -189,11 +190,13 @@ function h5Login(userName) { ...@@ -189,11 +190,13 @@ function h5Login(userName) {
189 } 190 }
190 }).then((res) => { 191 }).then((res) => {
191 uni.setStorageSync('token', res.data.token); 192 uni.setStorageSync('token', res.data.token);
193 }).finally(() => {
194 uni.hideLoading()
192 }) 195 })
193 } 196 }
194 197
195 function showLogin(callback) { 198 function showLogin(callback) {
196 uni.removeStorageSync("token") 199 uni.removeStorageSync("userName")
197 200
198 uni.showModal({ 201 uni.showModal({
199 title: '请输入身份证,进行身份验证', 202 title: '请输入身份证,进行身份验证',
......
...@@ -62,7 +62,10 @@ let request = function(req) { ...@@ -62,7 +62,10 @@ let request = function(req) {
62 const baseUrl = config.localPort + '/jsintszxd/request' 62 const baseUrl = config.localPort + '/jsintszxd/request'
63 63
64 if (req.method === 'POST') { 64 if (req.method === 'POST') {
65 req.params.userNo = token 65 if (token) {
66 req.params.userNo = token
67 }
68
66 url = baseUrl 69 url = baseUrl
67 data = { 70 data = {
68 appSecretId: config.appSecretId, 71 appSecretId: config.appSecretId,
...@@ -90,7 +93,10 @@ let request = function(req) { ...@@ -90,7 +93,10 @@ let request = function(req) {
90 } 93 }
91 } else { 94 } else {
92 if (req.method === 'POST') { 95 if (req.method === 'POST') {
93 req.params.userNo = token 96 if (token) {
97 req.params.userNo = token
98 }
99
94 data = { 100 data = {
95 jsonBody: JSON.stringify(req.params) 101 jsonBody: JSON.stringify(req.params)
96 } 102 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!