Commit 7e73221c by liangjianmin

爱智活动兼容

parent 0fa01044
{
"pages": [
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#BF0009",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false
}
},
{"path": "pages/index/kf",
"style": {
"navigationBarTitleText": "iEdge爱智 - 在线咨询",
"navigationBarBackgroundColor": "#BF0009",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false
}
},
{"path": "pages/class/nav"},
{"path": "pages/class/list"},
{"path": "pages/search/nav"},
{"path": "pages/search/list"},
{"path": "pages/goods/detail"},
{"path": "pages/auth/login"},
{"path": "pages/auth/reg"},
{"path": "pages/auth/regSuccess"},
{"path": "pages/auth/forget"},
{"path": "pages/auth/findSuccess"},
{"path": "pages/auth/rule"},
{"path": "pages/auth/changeEmail"},
{"path": "pages/car/list"},
{"path": "pages/car/confirmOrder"},
{"path": "pages/car/confirmQuote"},
{"path": "pages/car/confirmQuoteSuccess"},
{"path": "pages/car/confirmRule"},
{"path": "pages/user/userInfo"},
{"path": "pages/user/msgList"},
{"path": "pages/user/coupon"},
{"path": "pages/user/address"},
{"path": "pages/user/qDlist"},
{"path": "pages/user/qdDetail"},
{"path": "pages/user/addressAdd"},
{"path": "pages/user/addressEdit"},
{"path": "pages/user/invoice"},
{"path": "pages/user/invoiceEdit"},
{"path": "pages/user/invoiceAdd"},
{"path": "pages/user/companyInfo"},
{"path": "pages/user/companyInfoList"},
{"path": "pages/user/setting"},
{"path": "pages/user/orderList"},
{"path": "pages/user/orderDetail"},
{"path": "pages/user/orderPay"},
{"path": "pages/user/orderPayLine"},
{"path": "pages/activity/ac618"}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "爱智工业品",
"navigationBarBackgroundColor": "#F8F8F8",
// "backgroundColor": "#fff"
"navigationStyle": "custom"
},
"pages": [{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#BF0009",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false
}
},
{
"path": "pages/index/kf",
"style": {
"navigationBarTitleText": "iEdge爱智 - 在线咨询",
"navigationBarBackgroundColor": "#BF0009",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false
}
},
{ "path": "pages/class/nav" },
{ "path": "pages/class/list" },
{ "path": "pages/search/nav" },
{ "path": "pages/search/list" },
{ "path": "pages/goods/detail" },
{ "path": "pages/auth/login" },
{ "path": "pages/auth/reg" },
{ "path": "pages/auth/regSuccess" },
{ "path": "pages/auth/forget" },
{ "path": "pages/auth/findSuccess" },
{ "path": "pages/auth/rule" },
{ "path": "pages/auth/changeEmail" },
{ "path": "pages/car/list" },
{ "path": "pages/car/confirmOrder" },
{ "path": "pages/car/confirmQuote" },
{ "path": "pages/car/confirmQuoteSuccess" },
{ "path": "pages/car/confirmRule" },
{ "path": "pages/user/userInfo" },
{ "path": "pages/user/msgList" },
{ "path": "pages/user/coupon" },
{ "path": "pages/user/address" },
{ "path": "pages/user/qDlist" },
{ "path": "pages/user/qdDetail" },
{ "path": "pages/user/addressAdd" },
{ "path": "pages/user/addressEdit" },
{ "path": "pages/user/invoice" },
{ "path": "pages/user/invoiceEdit" },
{ "path": "pages/user/invoiceAdd" },
{ "path": "pages/user/companyInfo" },
{ "path": "pages/user/companyInfoList" },
{ "path": "pages/user/setting" },
{ "path": "pages/user/orderList" },
{ "path": "pages/user/orderDetail" },
{ "path": "pages/user/orderPay" },
{ "path": "pages/user/orderPayLine" },
{ "path": "pages/activity/ac618" },
{ "path": "pages/activity/index" }
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "爱智工业品",
"navigationBarBackgroundColor": "#F8F8F8",
"navigationStyle": "custom"
},
"uniIdRouter": {}
"uniIdRouter": {}
}
\ No newline at end of file
{
"hash": "a9213757",
"configHash": "4d6e96d7",
"hash": "8f3bac2e",
"configHash": "f66efb7f",
"lockfileHash": "e3b0c442",
"browserHash": "1f133704",
"browserHash": "878b3a45",
"optimized": {},
"chunks": {}
}
\ No newline at end of file
......@@ -13,26 +13,26 @@ export const request = (url = '', type = 'GET', param = {}, Loading, headertype)
// //h5统一携带参数pf
var params = Object.assign(param, {
pf: process.env.UNI_PLATFORM == 'h5'?'h5':'xcx'
pf: process.env.UNI_PLATFORM == 'h5' ? 'h5' : 'xcx'
});
// //请求es相关
// if (url.indexOf("so12.ichunt.") != -1 || url.indexOf("/esapi/") != -1 || url.indexOf("/goods/detail") != -1|| url.indexOf("/optimum/goods") != -1|| url.indexOf("/cart/lists") != -1) {
// params = Object.assign(param, { hkyefgyd: 1 });
// }
const token= uni.getStorageSync("token")
const token = uni.getStorageSync("token")
//请求类型判断
let header = {
"Content-Type": "application/json; charset=utf-8"
}
if (headertype) {
header = {
'Content-Type': 'application/x-www-form-urlencoded'
}
}
if(token){
header.token=token
}
if (token) {
header.token = token
}
return new Promise((resolve, reject) => {
uni.request({
method: type,
......@@ -45,20 +45,20 @@ export const request = (url = '', type = 'GET', param = {}, Loading, headertype)
if (Loading) uni.hideLoading();
if (response.statusCode === 200) {
let result = response.data;
if(result.code==101||result.msg=='账号未登录'){
var pages = getCurrentPages(); // 获取栈实例
let currentPage = pages[pages.length - 1]; // 获取当前页面实例
let currentPath = currentPage.route; // 获取当前页面路由
let currentPageFullPath = currentPage['$page']['fullPath']; // 当前页面路径
console.log(currentPageFullPath)
uni.reLaunch({
url: `/pages/auth/login?referer=${encodeURIComponent(currentPageFullPath)}`
});
return
}
if (result.code == 101 || result.msg == '账号未登录') {
var pages = getCurrentPages(); // 获取栈实例
let currentPage = pages[pages.length - 1]; // 获取当前页面实例
let currentPath = currentPage.route; // 获取当前页面路由
let currentPageFullPath = currentPage['$page']['fullPath']; // 当前页面路径
console.log(currentPageFullPath)
uni.reLaunch({
url: `/pages/auth/login?referer=${encodeURIComponent(currentPageFullPath)}`
});
return
}
resolve(result);
} else {
reject(response);
......@@ -94,6 +94,15 @@ export const getPlatform = () => {
return platform;
}
/**
* 来创建指定长度且所有元素都被初始化为 false 的数组
*/
export const createArray = (length, value) => {
return Array(length).fill(value);
}
/**
* 手机验证码倒计时函数
* @param {Object} options - 配置项
......@@ -136,7 +145,4 @@ export const startCountdown = (options) => {
start,
stop,
};
}
}
\ No newline at end of file
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 sign in to comment