Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-annual-summary
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.education.frontend
pica-annual-summary
提交
1ec81269
提交
1ec81269
编写于
2月 02, 2021
作者:
guangjun.yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
代码问题
上级
b9a4a000
变更
1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
9 行增加
和
9 行删除
+9
-9
mixins.js
src/utils/mixins.js
+9
-9
未找到文件。
src/utils/mixins.js
浏览文件 @
1ec81269
...
@@ -120,7 +120,7 @@ module.exports = {
...
@@ -120,7 +120,7 @@ module.exports = {
// 通用GET请求
// 通用GET请求
GET
(
api
,
para
,
callback
,
str
)
{
GET
(
api
,
para
,
callback
,
str
)
{
// debugger
// debugger
let
token
=
para
.
token
||
this
.
token
||
this
.
$store
.
state
.
commonuserInfo
.
userToken
;
let
token
=
para
.
token
||
this
.
token
||
this
.
$store
.
state
.
common
.
userInfo
.
userToken
;
para
.
token
=
token
;
para
.
token
=
token
;
delete
para
.
token
;
delete
para
.
token
;
delete
para
.
setEntry
;
delete
para
.
setEntry
;
...
@@ -158,7 +158,7 @@ module.exports = {
...
@@ -158,7 +158,7 @@ module.exports = {
// 通用POST请求
// 通用POST请求
POST
(
api
,
para
,
callback
)
{
POST
(
api
,
para
,
callback
)
{
let
token
=
para
.
token
||
this
.
token
||
this
.
$store
.
state
.
commonuserInfo
.
userToken
;
let
token
=
para
.
token
||
this
.
token
||
this
.
$store
.
state
.
common
.
userInfo
.
userToken
;
para
.
token
=
token
;
para
.
token
=
token
;
delete
para
.
token
;
delete
para
.
token
;
delete
para
.
setEntry
;
delete
para
.
setEntry
;
...
@@ -172,7 +172,7 @@ module.exports = {
...
@@ -172,7 +172,7 @@ module.exports = {
// 通用POST请求
// 通用POST请求
NEW_POST
(
api
,
para
,
callback
)
{
NEW_POST
(
api
,
para
,
callback
)
{
// para.token = para.token || this.token || this.$store.state.commonuserInfo.userToken;
// para.token = para.token || this.token || this.$store.state.common
.
userInfo.userToken;
return
fetch
({
return
fetch
({
url
:
getBaseUrl
(
api
),
url
:
getBaseUrl
(
api
),
method
:
'post'
,
method
:
'post'
,
...
@@ -182,7 +182,7 @@ module.exports = {
...
@@ -182,7 +182,7 @@ module.exports = {
// 通用GET请求
// 通用GET请求
API_GET
(
api
,
para
,
callback
)
{
API_GET
(
api
,
para
,
callback
)
{
para
.
token
=
para
.
token
||
this
.
token
||
this
.
$store
.
state
.
commonuserInfo
.
userToken
;
//'AF3DFCF2DD4B4115AC47ACA25D5420E9''F90DF48D3EFA49DFAE1267A67DBEFB18'//token
para
.
token
=
para
.
token
||
this
.
token
||
this
.
$store
.
state
.
common
.
userInfo
.
userToken
;
//'AF3DFCF2DD4B4115AC47ACA25D5420E9''F90DF48D3EFA49DFAE1267A67DBEFB18'//token
let
url
=
api
+
this
.
getUrlPara
(
para
)
let
url
=
api
+
this
.
getUrlPara
(
para
)
return
fetch
({
return
fetch
({
url
:
getApiUrl
(
url
),
url
:
getApiUrl
(
url
),
...
@@ -193,7 +193,7 @@ module.exports = {
...
@@ -193,7 +193,7 @@ module.exports = {
// 通用POST请求
// 通用POST请求
API_POST
(
api
,
para
,
callback
)
{
API_POST
(
api
,
para
,
callback
)
{
para
.
token
=
para
.
token
||
this
.
token
||
this
.
$store
.
state
.
commonuserInfo
.
userToken
;
//'AF3DFCF2DD4B4115AC47ACA25D5420E9''F90DF48D3EFA49DFAE1267A67DBEFB18'//token
para
.
token
=
para
.
token
||
this
.
token
||
this
.
$store
.
state
.
common
.
userInfo
.
userToken
;
//'AF3DFCF2DD4B4115AC47ACA25D5420E9''F90DF48D3EFA49DFAE1267A67DBEFB18'//token
return
fetch
({
return
fetch
({
url
:
getApiUrl
(
api
),
url
:
getApiUrl
(
api
),
method
:
'post'
,
method
:
'post'
,
...
@@ -233,11 +233,11 @@ module.exports = {
...
@@ -233,11 +233,11 @@ module.exports = {
commonCheckToken
(
cb
)
{
commonCheckToken
(
cb
)
{
console
.
log
(
'5555 this.token'
,
this
.
token
);
console
.
log
(
'5555 this.token'
,
this
.
token
);
let
param
=
{
let
param
=
{
token
:
this
.
token
||
this
.
$store
.
state
.
commonuserInfo
.
userToken
||
localStorage
.
getItem
(
"couponToken"
)
||
getCookie
(
"couponToken"
),
token
:
this
.
token
||
this
.
$store
.
state
.
common
.
userInfo
.
userToken
||
localStorage
.
getItem
(
"couponToken"
)
||
getCookie
(
"couponToken"
),
// token: this.token || this.$store.state.commonuserInfo.userToken,
// token: this.token || this.$store.state.common
.
userInfo.userToken,
setEntry
:
true
setEntry
:
true
};
};
console
.
log
(
'this.token || this.$store.state.common
userInfo.userToken'
,
this
.
token
,
this
.
$store
.
state
.
common
userInfo
.
userToken
);
console
.
log
(
'this.token || this.$store.state.common
.userInfo.userToken'
,
this
.
token
,
this
.
$store
.
state
.
common
.
userInfo
.
userToken
);
this
.
GET
(
"campaign/admin/task/checkToken"
,
param
).
then
(
res
=>
{
this
.
GET
(
"campaign/admin/task/checkToken"
,
param
).
then
(
res
=>
{
if
(
res
.
code
!==
"000000"
)
{
if
(
res
.
code
!==
"000000"
)
{
console
.
log
(
'commonCheckToken'
,
window
.
__isWeb
);
console
.
log
(
'commonCheckToken'
,
window
.
__isWeb
);
...
@@ -255,7 +255,7 @@ module.exports = {
...
@@ -255,7 +255,7 @@ module.exports = {
// 校验token,有效则调用回调函数,否则使用调起原生登陆页面
// 校验token,有效则调用回调函数,否则使用调起原生登陆页面
checkTokenForNative
(
cb
)
{
checkTokenForNative
(
cb
)
{
let
param
=
{
let
param
=
{
token
:
this
.
token
||
this
.
$store
.
state
.
commonuserInfo
.
userToken
,
token
:
this
.
token
||
this
.
$store
.
state
.
common
.
userInfo
.
userToken
,
setEntry
:
true
setEntry
:
true
};
};
this
.
GET
(
"campaign/admin/task/checkToken"
,
param
).
then
(
res
=>
{
this
.
GET
(
"campaign/admin/task/checkToken"
,
param
).
then
(
res
=>
{
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录