mirror of
https://gitee.com/java110/PropertyApp.git
synced 2026-02-23 21:36:39 +08:00
20 lines
416 B
JavaScript
20 lines
416 B
JavaScript
|
|
import {hasSession} from './api/Java110SessionApi.js'
|
|
|
|
export default{
|
|
/**
|
|
* 请求
|
|
* @param {Object} _reqObj 请求内容
|
|
*/
|
|
request:function(_reqObj) {
|
|
//检查是否登录成功
|
|
hasSession()
|
|
.then((_data)=>{
|
|
//重写token
|
|
_reqObj.header.cookie = '_java110_token_=' + uni.getStorageSync('token'); //console.log("_reqObj",_reqObj);
|
|
console.log(_reqObj);
|
|
uni.request(_reqObj);
|
|
})
|
|
|
|
}
|
|
} |