20240529
This commit is contained in:
+73
-68
@@ -2,10 +2,10 @@ const env = "d";
|
||||
|
||||
const version = 1,
|
||||
|
||||
//理车宝
|
||||
app_id = '1c156bb57cd6984a' +
|
||||
'',
|
||||
key = '71fd71173b776766a2ae1209d9a2c2ed';
|
||||
//理车宝
|
||||
app_id = '1c156bb57cd6984a' +
|
||||
'',
|
||||
key = '71fd71173b776766a2ae1209d9a2c2ed';
|
||||
|
||||
//好店云
|
||||
// app_id = 'ebb6d3808b2fa324',
|
||||
@@ -26,6 +26,7 @@ api = {
|
||||
appUserUkey: "app/user/ukey", //登录/退出登录
|
||||
appUser: "app/user", //用户信息
|
||||
appSms: "app/sms", //获取验证码
|
||||
appUserTel: "app/user/tel", //获取用户手机号
|
||||
appSeriesCars: "app/series/cars", //获取车型库
|
||||
appSeriesAttrs: "app/series/attrs", //获取车型属性
|
||||
appCustomersTabs: "app/customers/tabs", //获取tab
|
||||
@@ -87,92 +88,96 @@ api = {
|
||||
materialStatisticsChart: 'material/statistics/chart', //数据分析_图表
|
||||
|
||||
appCusorder2: 'app/cusorder2', //新建订单(新)/修改订单信息
|
||||
|
||||
|
||||
appCustomersDefeats: 'app/customers/defeats', //战败客户列表 /战败/再战申请
|
||||
|
||||
appServices:'app/services', //获取代办服务列表
|
||||
appFine:'app/fine', //获取精品赠送列表 /获取精品选装
|
||||
appServices: 'app/services', //获取代办服务列表
|
||||
appFine: 'app/fine', //获取精品赠送列表 /获取精品选装
|
||||
|
||||
materialHomeBiz:'material/home/biz', //店铺海报
|
||||
materialHomePosters:'material/home/posters', //保存店铺海报
|
||||
materialHomeBiz: 'material/home/biz', //店铺海报
|
||||
materialHomePosters: 'material/home/posters', //保存店铺海报
|
||||
|
||||
appDelivery:'app/delivery', //获取车辆确定随车资料
|
||||
appDelivery: 'app/delivery', //获取车辆确定随车资料
|
||||
|
||||
materialHomeBiz_posters:'material/home/biz_posters', //店铺海报模版
|
||||
materialHomeBiz_posters: 'material/home/biz_posters', //店铺海报模版
|
||||
|
||||
appTransferLists:'app/transfer/lists', //调拨记录
|
||||
appTransfer:'app/transfer', //调拨详情 /确认发车/接车 /报备异常
|
||||
appTransferRemind:'app/transfer/remind', //调拨提醒
|
||||
appTransferLists: 'app/transfer/lists', //调拨记录
|
||||
appTransfer: 'app/transfer', //调拨详情 /确认发车/接车 /报备异常
|
||||
appTransferRemind: 'app/transfer/remind', //调拨提醒
|
||||
|
||||
appCusorderCdata:'app/cusorder/cdata', //上传资料
|
||||
appCusorderCdata: 'app/cusorder/cdata', //上传资料
|
||||
|
||||
appBrokerageOrders:'app/brokerage/orders', //转介绍列表
|
||||
appBrokerage:'app/brokerage', //获取佣金设置 /更新佣金设置 /创建佣金设置
|
||||
|
||||
appTransferTabs:'app/transfer/tabs', //调拨记录_tab
|
||||
appTransferTransport:'app/transfer/transport', //上传运输单
|
||||
appBrokerageOrders: 'app/brokerage/orders', //转介绍列表
|
||||
appBrokerage: 'app/brokerage', //获取佣金设置 /更新佣金设置 /创建佣金设置
|
||||
|
||||
appBizSituation_tabs:'app/biz/situation_tabs', //店铺概况_tab
|
||||
appBizSituation:'app/biz/situation', //店铺概况 /店铺概况保存
|
||||
appBizStreet:'app/biz/street', //获取乡镇
|
||||
|
||||
appCusorderV2Inten:'app/cusorderV2/inten', //新增意向金订单
|
||||
appCusorderV2:'app/cusorderV2', //新建订单 /获取订单列表 /订单详情 /修改订单信息
|
||||
appCusorderV2Tabs:'app/cusorderV2/tabs', //获取订单列表tab
|
||||
appCusorderdata:'app/Cusorderdata', //获取订单图片 /上传编辑国补资料
|
||||
appCusorderV2Info:'app/cusorderV2/info', //修改订单基本信息
|
||||
appCusorderV2Status:'app/cusorderV2/status', //删除订单
|
||||
appTransferTabs: 'app/transfer/tabs', //调拨记录_tab
|
||||
appTransferTransport: 'app/transfer/transport', //上传运输单
|
||||
|
||||
appSytactivityTabs:'app/sytactivity/tabs', //私域通_tab
|
||||
appSytactivityList:'app/sytactivity/list', //活动列表
|
||||
appSytactivityDetail:'app/sytactivity/detail', //活动详情
|
||||
appSytactivityLog:'app/sytactivity/log', //实时战报
|
||||
appSytactivityRanking:'app/sytactivity/ranking', //活动排名
|
||||
appBizSituation_tabs: 'app/biz/situation_tabs', //店铺概况_tab
|
||||
appBizSituation: 'app/biz/situation', //店铺概况 /店铺概况保存
|
||||
appBizStreet: 'app/biz/street', //获取乡镇
|
||||
|
||||
appInventoryTabs:'app/inventory/tabs', //盘点记录_tab
|
||||
appInventoryLists:'app/inventory/lists', //盘点记录
|
||||
appInventory:'app/inventory', //盘点详情 /盘点上传图片
|
||||
appInventoryRemind:'app/inventory/remind', //盘点提醒
|
||||
appCusorderV2Inten: 'app/cusorderV2/inten', //新增意向金订单
|
||||
appCusorderV2: 'app/cusorderV2', //新建订单 /获取订单列表 /订单详情 /修改订单信息
|
||||
appCusorderV2Tabs: 'app/cusorderV2/tabs', //获取订单列表tab
|
||||
appCusorderdata: 'app/Cusorderdata', //获取订单图片 /上传编辑国补资料
|
||||
appCusorderV2Info: 'app/cusorderV2/info', //修改订单基本信息
|
||||
appCusorderV2Status: 'app/cusorderV2/status', //删除订单
|
||||
|
||||
appGoodsRemind:'app/goods/remind', //库存提醒/预警
|
||||
appGoodsLists:'app/goods/lists', //库存列表
|
||||
appSytactivityTabs: 'app/sytactivity/tabs', //私域通_tab
|
||||
appSytactivityList: 'app/sytactivity/list', //活动列表
|
||||
appSytactivityDetail: 'app/sytactivity/detail', //活动详情
|
||||
appSytactivityLog: 'app/sytactivity/log', //实时战报
|
||||
appSytactivityRanking: 'app/sytactivity/ranking', //活动排名
|
||||
|
||||
appCustomersOffline_sources:'app/customers/offline_sources', //客户来源
|
||||
appCustomersTag:'app/customers/tag', //客户标签
|
||||
appInventoryTabs: 'app/inventory/tabs', //盘点记录_tab
|
||||
appInventoryLists: 'app/inventory/lists', //盘点记录
|
||||
appInventory: 'app/inventory', //盘点详情 /盘点上传图片
|
||||
appInventoryRemind: 'app/inventory/remind', //盘点提醒
|
||||
|
||||
appCityOncard:'app/city/oncard', //获取上牌城市
|
||||
appFinanceNums:'app/finance/nums', //获取金融分期期数
|
||||
appGoodsRemind: 'app/goods/remind', //库存提醒/预警
|
||||
appGoodsLists: 'app/goods/lists', //库存列表
|
||||
|
||||
appCusorderV2Customer:'app/cusorderV2/customer', //获取客户订单
|
||||
appCustomersOffline_sources: 'app/customers/offline_sources', //客户来源
|
||||
appCustomersTag: 'app/customers/tag', //客户标签
|
||||
|
||||
appCustomersVisit_tabs:'app/customers/visit_tabs', //回访待跟进tab
|
||||
appCityOncard: 'app/city/oncard', //获取上牌城市
|
||||
appFinanceNums: 'app/finance/nums', //获取金融分期期数
|
||||
|
||||
appIdcardInfo:'app/idcard/info', //识别身份证号码
|
||||
appCusorderV2Customer: 'app/cusorderV2/customer', //获取客户订单
|
||||
|
||||
appCustomersComments:'app/customers/comments', //用户评论
|
||||
appCustomersVisit_tabs: 'app/customers/visit_tabs', //回访待跟进tab
|
||||
|
||||
appCityArea:'app/city/area', //获取省/市/区/街道
|
||||
appIdcardInfo: 'app/idcard/info', //识别身份证号码
|
||||
|
||||
appEmployeesLeave:'app/employees/leave', //获取离职 //提交离职
|
||||
appCustomersComments: 'app/customers/comments', //用户评论
|
||||
|
||||
appCusorderV2Admins:'app/cusorderV2/admins', //分配订单
|
||||
appCityArea: 'app/city/area', //获取省/市/区/街道
|
||||
|
||||
appCusorderdataInfo:'app/cusorderdata/info', //保单信息确认
|
||||
appEmployeesLeave: 'app/employees/leave', //获取离职 //提交离职
|
||||
|
||||
appBizStats:'app/biz/stats', //数据看板首页
|
||||
appBizStats_customer:'app/biz/stats_customer', //客户数据
|
||||
appBizStats_wxqy:'app/biz/stats_wxqy', //企微数据
|
||||
appBizStats_order:'app/biz/stats_order', //订单数据
|
||||
appBizStats_days:'app/biz/stats_days', //客户/订单走势图
|
||||
appBizStats_customer_pid:'app/biz/stats_customer_pid', //客户数据二级
|
||||
appBizStats_order_series:'app/biz/stats_order_series', //品牌数据二级
|
||||
appCusorderV2Admins: 'app/cusorderV2/admins', //分配订单
|
||||
|
||||
appOptions:'app/options', //获取车辆选装包
|
||||
appCusorderdataInfo: 'app/cusorderdata/info', //保单信息确认
|
||||
|
||||
appResetgroupid:'app/user/resetgroupid', //切换角色
|
||||
appBizStats: 'app/biz/stats', //数据看板首页
|
||||
appBizStats_customer: 'app/biz/stats_customer', //客户数据
|
||||
appBizStats_wxqy: 'app/biz/stats_wxqy', //企微数据
|
||||
appBizStats_order: 'app/biz/stats_order', //订单数据
|
||||
appBizStats_days: 'app/biz/stats_days', //客户/订单走势图
|
||||
appBizStats_customer_pid: 'app/biz/stats_customer_pid', //客户数据二级
|
||||
appBizStats_order_series: 'app/biz/stats_order_series', //品牌数据二级
|
||||
|
||||
appOptions: 'app/options', //获取车辆选装包
|
||||
|
||||
appResetgroupid: 'app/user/resetgroupid', //切换角色
|
||||
|
||||
appClues: "app/clues", //获取线索列表 获取线索详情
|
||||
appCluesLogs: "app/clueslogs", //线索日志
|
||||
|
||||
appSignConf: "app/sign/conf", //签到配置信息
|
||||
appUserConf: "app/sign/userConf", //用户签到配置信息
|
||||
appSign: "app/sign", //用户签到
|
||||
}
|
||||
|
||||
//远程图片存储地址
|
||||
@@ -192,17 +197,17 @@ var elementScrollTop = '150'
|
||||
|
||||
/**
|
||||
* 提醒模板id
|
||||
*/
|
||||
var bookTmpId ='zT5wqntUU0ipSJY7Hlw4T4lKfWwTddn3tv8udUv-rdo'
|
||||
*/
|
||||
var bookTmpId = 'zT5wqntUU0ipSJY7Hlw4T4lKfWwTddn3tv8udUv-rdo'
|
||||
|
||||
/**
|
||||
* 开奖模板id
|
||||
*/
|
||||
*/
|
||||
var getLotteryTmpId = '5Lv1DATQLG23omDhIA8DS2ZBM6zU9prvt94BO7S9exc'
|
||||
|
||||
/**
|
||||
* 模板id
|
||||
*/
|
||||
*/
|
||||
var subscribeTmpId = {
|
||||
book: 'zT5wqntUU0ipSJY7Hlw4T4lKfWwTddn3tv8udUv-rdo',
|
||||
getlottery: '5Lv1DATQLG23omDhIA8DS2ZBM6zU9prvt94BO7S9exc'
|
||||
@@ -210,9 +215,9 @@ var subscribeTmpId = {
|
||||
|
||||
/**
|
||||
* 接口白名单
|
||||
*/
|
||||
*/
|
||||
var white401UrlList = {
|
||||
'app/home/qrcode':'app/home/qrcode'
|
||||
'app/home/qrcode': 'app/home/qrcode'
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1006,4 +1006,32 @@ apiQuery.getAppCluesLogs = function (params) {
|
||||
HttpRequest(true, Config.api.appCluesLogs, 2, params, "GET", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
//获取签到配置信息
|
||||
apiQuery.getappSignConf = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(true, Config.api.appSignConf, 2, params, "GET", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
//获取用户签到配置信息
|
||||
apiQuery.getappUserConf = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpNoUkeyRequest(false, Config.api.appUserConf, 2, params, "GET", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
//获取签到配置信息
|
||||
apiQuery.getappUserTel = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(true, Config.api.appUserTel, 2, params, "GET", resolve, reject)
|
||||
})
|
||||
}
|
||||
//用户签到
|
||||
apiQuery.postAppSign = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(false, Config.api.appSign, 2, params, "POST", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
export default apiQuery;
|
||||
@@ -1,6 +1,8 @@
|
||||
|
||||
import Config from '../config';
|
||||
import { toEncrypt, randomString } from 'stringEncrypt';
|
||||
import {
|
||||
toEncrypt,
|
||||
randomString
|
||||
} from 'stringEncrypt';
|
||||
let app = getApp();
|
||||
|
||||
function HttpNoUkeyRequest(loading, url, sessionChoose, params, method, callBack, reject) {
|
||||
@@ -10,8 +12,8 @@ function HttpNoUkeyRequest(loading, url, sessionChoose, params, method, callBack
|
||||
let paramSession = sessionChoose == 1 ? {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
} : {
|
||||
'content-type': 'application/json'
|
||||
};
|
||||
'content-type': 'application/json'
|
||||
};
|
||||
var params = Object.prototype.toString.call(params) == "[object Object]" ? params : {};
|
||||
params["version"] = Config.version;
|
||||
params["nonce_str"] = randomString();
|
||||
@@ -45,7 +47,7 @@ function HttpNoUkeyRequest(loading, url, sessionChoose, params, method, callBack
|
||||
} else {
|
||||
app.printErrorClient('failrequest', ['api地址:' + url, '传入数据:' + JSON.stringify(serectParams), '响应数据:' + JSON.stringify(res.data)])
|
||||
reject(res.data);
|
||||
if (Config.white401UrlList[url] === url) {//接口白名单
|
||||
if (Config.white401UrlList[url] === url) { //接口白名单
|
||||
return
|
||||
}
|
||||
wx.showToast({
|
||||
@@ -75,8 +77,8 @@ function HttpRequest(loading, url, sessionChoose, params, method, callBack, reje
|
||||
let paramSession = sessionChoose == 1 ? {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
} : {
|
||||
'content-type': 'application/json'
|
||||
};
|
||||
'content-type': 'application/json'
|
||||
};
|
||||
var params = Object.prototype.toString.call(params) == "[object Object]" ? params : {};
|
||||
params["ukey"] = ukey;
|
||||
params["version"] = Config.version;
|
||||
@@ -104,21 +106,21 @@ function HttpRequest(loading, url, sessionChoose, params, method, callBack, reje
|
||||
// HttpRequest(loading, url, sessionChoose, params, method, callBack, reject)
|
||||
// })
|
||||
//if (getCurrentPages().pop().route != 'pages/login/index'){
|
||||
wx.clearStorage()
|
||||
wx.reLaunch({
|
||||
url: '/pages/login/index'
|
||||
})
|
||||
wx.clearStorage()
|
||||
wx.reLaunch({
|
||||
url: '/pages/login/index'
|
||||
})
|
||||
//}
|
||||
}else{
|
||||
if (res.data.code==200){
|
||||
} else {
|
||||
if (res.data.code == 200) {
|
||||
callBack(res.data);
|
||||
}else{
|
||||
app.printErrorClient('failrequest',['api地址:'+url,'传入数据:'+JSON.stringify(serectParams),'响应数据:'+JSON.stringify(res.data)])
|
||||
} else {
|
||||
app.printErrorClient('failrequest', ['api地址:' + url, '传入数据:' + JSON.stringify(serectParams), '响应数据:' + JSON.stringify(res.data)])
|
||||
reject(res.data);
|
||||
if (Config.white401UrlList[url] === url) {//接口白名单
|
||||
if (Config.white401UrlList[url] === url) { //接口白名单
|
||||
return
|
||||
}
|
||||
if(res.data.msg){
|
||||
if (res.data.msg) {
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: "none"
|
||||
@@ -129,7 +131,7 @@ function HttpRequest(loading, url, sessionChoose, params, method, callBack, reje
|
||||
},
|
||||
fail: function (res) {
|
||||
console.warn("HttpRequst当中wx.request fail 执行了:调用失败")
|
||||
app.printErrorClient('failrequest',['HttpRequst当中wx.request fail 执行了:调用失败','api地址:'+url,'传入数据:'+JSON.stringify(serectParams),'响应数据:'+JSON.stringify(res.data)])
|
||||
app.printErrorClient('failrequest', ['HttpRequst当中wx.request fail 执行了:调用失败', 'api地址:' + url, '传入数据:' + JSON.stringify(serectParams), '响应数据:' + JSON.stringify(res.data)])
|
||||
}
|
||||
})
|
||||
} else {
|
||||
@@ -140,16 +142,16 @@ function HttpRequest(loading, url, sessionChoose, params, method, callBack, reje
|
||||
// HttpRequest(loading, url, sessionChoose, params, method, callBack, reject)
|
||||
// })
|
||||
//if (getCurrentPages().pop().route != 'pages/login/index') {
|
||||
wx.clearStorage()
|
||||
wx.reLaunch({
|
||||
url: '/pages/login/index'
|
||||
})
|
||||
wx.clearStorage()
|
||||
wx.reLaunch({
|
||||
url: '/pages/login/index'
|
||||
})
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
function asyncLogin(flag) {
|
||||
|
||||
|
||||
return new Promise((reslove, reject) => {
|
||||
if (app.globalData.loginRuning) {
|
||||
//已经在执行了
|
||||
@@ -158,7 +160,7 @@ function asyncLogin(flag) {
|
||||
app.globalData.loginRuning = true;
|
||||
work(reslove, reject, flag)
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
@@ -177,7 +179,7 @@ function _resloveRun() {
|
||||
function work(reslove, reject, flag) {
|
||||
wx.checkSession({
|
||||
success: function () {
|
||||
|
||||
|
||||
//同步获取token
|
||||
let ukey = app.getStorageByKey("ukey");
|
||||
console.log("asyncLogin(checkSession-success)-ukey:" + ukey)
|
||||
@@ -196,20 +198,22 @@ function work(reslove, reject, flag) {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function wxLogin(reslove) {
|
||||
wx.login({
|
||||
success(res) {
|
||||
console.log("执行了wx.login-code:"+res.code)
|
||||
console.log("执行了wx.login-code:" + res.code)
|
||||
if (res.code) {
|
||||
let params = {
|
||||
code: res.code,
|
||||
by_code: 1,
|
||||
app_id: Config.app_id,
|
||||
nonce_str: randomString()
|
||||
}
|
||||
let sendData={
|
||||
let sendData = {
|
||||
...params,
|
||||
sign: toEncrypt(params)
|
||||
}
|
||||
}
|
||||
wx.request({
|
||||
url: Config.api.baseUrl + Config.api.appUserUkey,
|
||||
data: sendData,
|
||||
@@ -219,7 +223,7 @@ function wxLogin(reslove) {
|
||||
},
|
||||
method: "GET",
|
||||
success: function (res) {
|
||||
console.log("wx.login-ukey:"+res.data.data.ukey)
|
||||
console.log("wx.login-ukey:" + res.data.data.ukey)
|
||||
if (res.data.code == 200) {
|
||||
app.globalData.ukey = res.data.data.ukey;
|
||||
app.setStorage("ukey", res.data.data.ukey, function () {
|
||||
@@ -246,10 +250,9 @@ app.asyncLogin = asyncLogin;
|
||||
|
||||
|
||||
|
||||
export { HttpNoUkeyRequest, HttpRequest, asyncLogin, app }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export {
|
||||
HttpNoUkeyRequest,
|
||||
HttpRequest,
|
||||
asyncLogin,
|
||||
app
|
||||
}
|
||||
@@ -134,7 +134,7 @@ let combineUrl = (DATA) => {
|
||||
let toEncrypt = (DATA) => {
|
||||
// let secretKey = randomString()
|
||||
let data = combineUrl(DATA)
|
||||
//console.log(data)//加密原始数据
|
||||
// console.log(data)//加密原始数据
|
||||
return md5.hex_md5(data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user