Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
uniapp_vedio
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
uniapp_vedio
Commits
841b27d1
Commit
841b27d1
authored
Jun 26, 2024
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
header添加version
parent
dbf68494
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
6 deletions
+13
-6
userServices.js
vedio/common/services/userServices.js
+6
-3
apiRequest.js
vedio/common/utils/apiRequest.js
+6
-3
utils.js
vedio/utils/utils.js
+1
-0
No files found.
vedio/common/services/userServices.js
View file @
841b27d1
...
...
@@ -18,7 +18,8 @@ import {
}
from
"../utils/util.js"
;
import
{
PAKEAGE_NAME
PAKEAGE_NAME
,
VERSION_CODE
}
from
"../../utils/utils.js"
;
import
{
printError
...
...
@@ -148,7 +149,8 @@ function postPhone(data, callback) {
function
requestToken
(
data
,
callback
)
{
let
url
=
`
${
config
[
"BASE_URL"
]}
/user/ttLogin`
;
let
header
=
{
pkgName
:
PAKEAGE_NAME
,
pkgName
:
PAKEAGE_NAME
,
version
:
VERSION_CODE
,
token
:
``
}
uni
.
request
({
...
...
@@ -181,7 +183,8 @@ function requestUserInfo(callback) {
Object
.
assign
(
header
,
{
token
:
readToken
(),
pkgName
:
PAKEAGE_NAME
,
pkgName
:
PAKEAGE_NAME
,
version
:
VERSION_CODE
,
proChannel
:
uniChannel
})
...
...
vedio/common/utils/apiRequest.js
View file @
841b27d1
...
...
@@ -12,7 +12,8 @@ import {
appendParam
,
}
from
"./util"
;
import
{
PAKEAGE_NAME
PAKEAGE_NAME
,
VERSION_CODE
}
from
"../../utils/utils"
;
import
{
addNormalNotificationObserver
,
...
...
@@ -111,7 +112,8 @@ let apiRequest = function({
option
.
header
=
{
pkgName
:
PAKEAGE_NAME
,
token
:
`
${
token
}
`
,
token
:
`
${
token
}
`
,
version
:
VERSION_CODE
,
proChannel
:
uniChannel
}
// header处理
...
...
@@ -252,7 +254,8 @@ function apiUPLOAD({
option
.
url
=
`
${
option
.
url
}
?t=
${
new
Date
().
getTime
()}
`
;
// 路径
option
.
header
=
{
pkgName
:
PAKEAGE_NAME
,
pkgName
:
PAKEAGE_NAME
,
version
:
VERSION_CODE
,
token
:
`
${
token
}
`
}
if
(
header
)
{
...
...
vedio/utils/utils.js
View file @
841b27d1
export
const
PAKEAGE_NAME
=
'com.duben.dybookhm'
export
const
VERSION_CODE
=
'1.0.1'
// export const PAKEAGE_NAME = 'com.test.test'
export
function
trim
(
str
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment