Commit 841b27d1 authored by mengcuiguang's avatar mengcuiguang

header添加version

parent dbf68494
......@@ -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
})
......
......@@ -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) {
......
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) {
......
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