Commit 8f144141 by wenyang

APP热更新接口添加到白名单中(不需要校验token与登录状态)

parent 9b52c127
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"name" : "CFFP财富中心", "name" : "CFFP财富中心",
"appid" : "__UNI__ED34740", "appid" : "__UNI__ED34740",
"description" : "", "description" : "",
"versionCode" : 103, "versionCode" : 104,
"transformPx" : false, "transformPx" : false,
/* 5+App特有相关 */ /* 5+App特有相关 */
"app-plus" : { "app-plus" : {
......
import {baseURL,apiURL,cffpURL} from "../environments/environment"; import {baseURL,apiURL,cffpURL} from "../environments/environment";
// 白名单,不需要携带token就允许被访问的接口 // 白名单,不需要携带token就允许被访问的接口
const whiteApiList = [`${apiURL}/authorize/obtainToken`, `${apiURL}/authorize/checkToken`, `${cffpURL}/user/loginVerification`]; const whiteApiList = [`${apiURL}/authorize/obtainToken`, `${apiURL}/authorize/checkToken`, `${cffpURL}/user/loginVerification`,`${apiURL}/appVersion/checkIsUpdate`];
export const interceptor = () => { export const interceptor = () => {
uni.addInterceptor('request', { uni.addInterceptor('request', {
// 请求拦截器 // 请求拦截器
invoke(args) { invoke(args) {
//console.log('请求拦截器',args.url); // console.log('请求拦截器',args.url);
// 加载loading // 加载loading
// uni.showLoading({ // uni.showLoading({
// title: '加载中...' // title: '加载中...'
...@@ -56,6 +56,7 @@ export const interceptor = () => { ...@@ -56,6 +56,7 @@ export const interceptor = () => {
// uni.redirectTo({ // uni.redirectTo({
// url:'/components/login/login' // url:'/components/login/login'
// }) // })
uni.removeStorageSync('isLogin');
uni.switchTab({ uni.switchTab({
url:'/pages/index/index' url:'/pages/index/index'
}) })
......
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