diff --git a/Activity/pages/index/index.vue b/Activity/pages/index/index.vue new file mode 100644 index 0000000..84e5c61 --- /dev/null +++ b/Activity/pages/index/index.vue @@ -0,0 +1,132 @@ + + + + + \ No newline at end of file diff --git a/BagAuth/pages/login/login.vue b/BagAuth/pages/login/login.vue index 6768907..46e6e26 100644 --- a/BagAuth/pages/login/login.vue +++ b/BagAuth/pages/login/login.vue @@ -1,36 +1,12 @@ + \ No newline at end of file diff --git a/api/oil-finance.js b/api/oil-finance.js index 3cd61a1..2d32a6b 100644 --- a/api/oil-finance.js +++ b/api/oil-finance.js @@ -10,4 +10,19 @@ export default { data: data }) }, + //获取所有油卡 + getLoginCustomerId(customerId) { + return request({ + url: `/oil-finance/oilCustomerCompanyAccount/getLoginCustomerId/${customerId}`, + method: 'GET', + }) + }, + //确认切换油卡 + chooseCompanyCard(data) { + return request({ + url: `/oil-identity/operationUser/chooseCompanyCard`, + method: 'post', + data:data + }) + }, } diff --git a/api/oil-identity.js b/api/oil-identity.js index 91ee7ce..5a92858 100644 --- a/api/oil-identity.js +++ b/api/oil-identity.js @@ -3,11 +3,12 @@ const service_name = "oil-identity" const group_name = "weChatAuthorization" const Wchat_id = 'wx7a939c19b270cc3d' export default { - autoLogin (data,url) { + autoLogin (data,url,requestParameter={}) { return request({ url: `/${service_name}/${group_name}/${url}`, method: 'post', - data:data + data:data, + ...requestParameter }) }, wechatLogin(data) { //卡力小程序跳转登录 @@ -27,11 +28,12 @@ export default { } }) }, - bindLoginByPhone (data,url) { + bindLoginByPhone (data,url,requestParameter={}) { return request({ url: `/${service_name}/${group_name}/${url}`, method: 'post', - data:data + data:data, + ...requestParameter }) }, diff --git a/api/oil-order.js b/api/oil-order.js index 376398d..76e7727 100644 --- a/api/oil-order.js +++ b/api/oil-order.js @@ -6,7 +6,7 @@ export default { // 下单 createOrder(data) { return request({ - url: `/${service_name}/${group_name}/createOrder`, + url: `/${service_name}/${group_name}/createBOrder`, method: 'post', data: data }) diff --git a/api/oil-site.js b/api/oil-site.js index 9a6679b..b632a2d 100644 --- a/api/oil-site.js +++ b/api/oil-site.js @@ -2,10 +2,10 @@ import request from '@/utils/request' const service_name = "oil-site" const group_name = "oilSiteAppInfo" const order_name = 'oilSiteOrderInfo' -export default { +export default { getOrderDiscountInfo(data) { return request({ - url: `/${service_name}/${order_name}/getOrderDiscountInfo`, + url: `/${service_name}/${order_name}/getBOrderDiscountInfo`, method: 'post', data: data }) @@ -50,14 +50,22 @@ export default { getSiteList(data) { // debugger return request({ - url: `/${service_name}/${group_name}/findSiteInfoByPage`, + url: `/${service_name}/${group_name}/findBSiteInfoByPage`, + method: 'post', + data: data + }) + }, + getBSitesByActivity(data) { + // debugger + return request({ + url: `/${service_name}/${group_name}/getBSitesByActivity`, method: 'post', data: data }) }, getSiteDetails(data) { return request({ - url: `/${service_name}/${group_name}/getSiteDetails`, + url: `/${service_name}/${group_name}/getBSiteDetails`, method: 'post', data: data }) @@ -87,7 +95,7 @@ export default { //下单 -- 获取最新油站价格、司机、加油员相关信息 getNewSitePrice(channelId) { return request({ - url: `/${service_name}/${group_name}/getNewSitePrice/${channelId} `, + url: `/${service_name}/${group_name}/getBNewSitePrice/${channelId} `, method: 'get' }) }, // 获取订单核销码 @@ -99,7 +107,7 @@ export default { }, wholeStationMap(data) { return request({ - url: `/oil-site/oilSiteInfo/wholeStationMap`, + url: `/oil-site/oilSiteInfo/wholeStationMapB`, method: 'post', data: data }) @@ -125,7 +133,7 @@ export default { // 路径规划 getSiteByGeoHashNew(points) { return request({ - url: `/${service_name}/oilSiteInfo/getSiteByGeoHashNewA`, + url: `/${service_name}/oilSiteInfo/getSiteByGeoHashNewB`, method: 'post', data: points, }) @@ -167,5 +175,11 @@ export default { } }) }, - +//检测在线状态 + isLoginSuccess() { + return request({ + url: `/oil-identity/operationUser/isLoginSuccess`, + method: 'POST', + }) + }, } diff --git a/colorui/components/cu-custom.vue b/colorui/components/cu-custom.vue index 0dcca0f..652166d 100644 --- a/colorui/components/cu-custom.vue +++ b/colorui/components/cu-custom.vue @@ -45,6 +45,10 @@ type: String, default: '' }, + callBack:{ + type:Function, + default:()=>null + }, isBack: { type: [Boolean, String], default: false @@ -59,21 +63,25 @@ } }, methods: { - BackPage() { - if(this.backCard == true){ - uni.redirectTo({ - url:'/BagMoney/pages/oilCards/oilCards' - }) - return - } - if(this.isPay == true){ - uni.switchTab({ - url:'/pages/tabbar/station/stationList' - }) - return + BackPage() { + if(this.callBack){ + this.callBack() + }else{ + if(this.backCard == true){ + uni.redirectTo({ + url:'/BagMoney/pages/oilCards/oilCards' + }) + return + } + if(this.isPay == true){ + uni.switchTab({ + url:'/pages/tabbar/station/stationList' + }) + return + } + uni.navigateBack({}) } - console.log('++++++++++++') - uni.navigateBack({}) + // uni.navigateBack({ // delta: 1 // }); diff --git a/components/SwitchEnterprises.vue b/components/SwitchEnterprises.vue new file mode 100644 index 0000000..b658efd --- /dev/null +++ b/components/SwitchEnterprises.vue @@ -0,0 +1,249 @@ + + + + + \ No newline at end of file diff --git a/components/site-item/site-item.vue b/components/site-item/site-item.vue index a051a11..b850ee7 100644 --- a/components/site-item/site-item.vue +++ b/components/site-item/site-item.vue @@ -5,8 +5,9 @@ - - {{siteItem.siteName}} + + {{siteItem.siteName}} + {{siteItem.siteLevel}} {{siteItem.siteType==1?'加油站':'加气站'}} @@ -30,8 +31,7 @@ ¥{{siteItem.sitePrice|moneyFormat}} - 省¥{{(siteItem.oilSitePrice - siteItem.sitePrice)|moneyFormat}} + 省¥{{(siteItem.oilSitePrice - siteItem.sitePrice)|moneyFormat}} @@ -169,6 +169,19 @@ + \ No newline at end of file diff --git a/pages/tabbar/home/home.vue b/pages/tabbar/home/home.vue index f103fd2..c18b56f 100644 --- a/pages/tabbar/home/home.vue +++ b/pages/tabbar/home/home.vue @@ -132,7 +132,7 @@ - + - - 企业会员 + + {{companyCard.name}} + {{companyCard.companyNature===1?'自营':'外请'}} - + @@ -53,11 +55,11 @@ 钱包余额(元) - + 您一共有 {{cardSum.length}} + class="oil-main-color padding-left-xs padding-right-xs">{{userTotal.oilCardNumber}} 张油卡 @@ -110,11 +112,11 @@ - + 联系客服 - + @@ -126,22 +128,29 @@ + + \ No newline at end of file diff --git a/static/img/wx-bg.png b/static/img/wx-bg.png new file mode 100644 index 0000000..ea75cc3 Binary files /dev/null and b/static/img/wx-bg.png differ diff --git a/static/img/wx-bg@2x.png b/static/img/wx-bg@2x.png new file mode 100644 index 0000000..6d13f1c Binary files /dev/null and b/static/img/wx-bg@2x.png differ diff --git a/utils/request.js b/utils/request.js index c107217..fba27e7 100644 --- a/utils/request.js +++ b/utils/request.js @@ -5,10 +5,10 @@ import utils from '@/utils/encode' // const env = 'test' const env = 'production' // 45 -const testUrl = 'http://192.168.1.83:38080' -// const productUrl = 'https://www.xingoil.com/adminapi' +const testUrl = 'http://192.168.0.254:38080' +const productUrl = 'https://www.xingoil.com/adminapi' -const productUrl = 'http://uat.xingoil.com/adminapi' +// const productUrl = 'http://uat.xingoil.com/adminapi' // const productUrl = 'http://192.168.0.191:38080' // const productUrl = 'http://121.196.213.68/adminapi' const service = axios.create({ @@ -19,7 +19,7 @@ const service = axios.create({ let closeShowLoading var url = '' service.interceptors.request.use( - config => { + config => { // 拦截请求 closeShowLoading = config?.closeShowLoading||false; // console.log(closeShowLoading,'isLoadingisLoadingisLoading') @@ -83,7 +83,8 @@ service.interceptors.request.use( } ) service.interceptors.response.use( - response => { + response => { + // console.log(response.config?.closePrompt,'response.config?.closePrompt') const res = response.data if (env === 'production') { // 生产环境,进行加密解密,不输出日志 @@ -103,8 +104,8 @@ service.interceptors.response.use( uni.hideLoading() } if (response.config.url.indexOf('/oil-site/oilSiteOrderInfo/getOrderQrCode') === -1) { - if (response.config.url.indexOf('/oil-site/oilSiteAppInfo/getSiteDetails') != -1) { - // console.log('这里是getSiteDetails 拦截处') + if (response.config.url.indexOf('/oil-site/oilSiteAppInfo/getBSiteDetails') != -1) { + // console.log('这里是getBSiteDetails 拦截处') // if (res.code != 20000&&res.msg!='令牌为空,不允许操作'&&res.msg!='您的ip已经更改,请重新登录'&&res.msg!='登录与操作设备不同') { // uni.showToast({ // title: res.msg, @@ -112,8 +113,7 @@ service.interceptors.response.use( // }) // } } else { - if (res.code != 20000 && res.msg != '令牌为空,不允许操作' && res.msg != '您的ip已经更改,请重新登录' && res.msg != - '登录与操作设备不同') { + if (res.code != 20000 && res.msg != '令牌为空,不允许操作' && res.msg != '您的ip已经更改,请重新登录' && res.msg != '登录与操作设备不同') { uni.showToast({ title: res.msg, icon: "none"