From 1886cb29a0ffc69c497e782655b29839ef16f91c Mon Sep 17 00:00:00 2001 From: Wik-T <812952667@qq.com> Date: Wed, 6 Apr 2022 09:35:09 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E6=96=87=E6=A1=88=202.?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=A2=E6=B2=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 4 +- Utils/Api.js | 13 +- pages/goods/refuel-confirm/refuel-confirm.vue | 2 +- pages/goods/refuel-details/refuel-details.vue | 1091 +++++++++-------- pages/goods/refuel-succes/refuel-succes.vue | 4 +- pages/goods/refuel/refuel.vue | 9 +- pages/order/confirmation.vue | 6 +- pages/tabBar/home/home.vue | 94 +- subPages/recharge-centre/recharge-centre.vue | 6 +- .../unionComfirmation/unionComfirmation.vue | 6 +- uni.scss | 4 + 11 files changed, 698 insertions(+), 541 deletions(-) diff --git a/App.vue b/App.vue index eb2a24c..751aaba 100644 --- a/App.vue +++ b/App.vue @@ -32,7 +32,9 @@ //门店ID storeid:'', //门店名字 - storename:'' + storename:'', + //公众号进入值 + accountId:'' }, onLaunch: function() { }, diff --git a/Utils/Api.js b/Utils/Api.js index db81705..1431920 100644 --- a/Utils/Api.js +++ b/Utils/Api.js @@ -26,7 +26,11 @@ export const setUserPayPwd = params => { // 修改用户积分支付密码 export const updateUserPayPwd = params => { return POST('POST', `${base}/highUser/updateUserPayPwd`, params).then(res => res.data); -} +} +//经纬度转换 +export const findByLatAndLng = params => { + return POST('GET', `${base}/common/findByLatAndLng`, params).then(res => res.data); +} //获取用户信息 export const findUser = params => { @@ -176,8 +180,11 @@ export const getGasStoreList = params => { //查询团油详情 export const getGasDetailByStoreKey = params => { return POST('GET', `${base}/highGas/getGasDetailByStoreKey`, params).then(res => res.data); -} - +} +//团油距离限制 +export const getDictionaryByCodeTypeOl = params => { + return POST('GET', `${base}/common/getDictionaryByCodeTypeOl`, params).then(res => res.data); +} //获取已开通的省份 export const getDredgeProvince = params => { return POST('GET', `${base}/common/getDredgeProvince`, params).then(res => res.data); diff --git a/pages/goods/refuel-confirm/refuel-confirm.vue b/pages/goods/refuel-confirm/refuel-confirm.vue index b81c6f0..a289b14 100644 --- a/pages/goods/refuel-confirm/refuel-confirm.vue +++ b/pages/goods/refuel-confirm/refuel-confirm.vue @@ -137,7 +137,7 @@ let that = this; that.paytype = ''; that.user = app.globalData.userInfo; - that.getHuiLianTongCardBalance(); + // that.getHuiLianTongCardBalance(); }, methods: { //密码支付完成 diff --git a/pages/goods/refuel-details/refuel-details.vue b/pages/goods/refuel-details/refuel-details.vue index aa8c146..5f955cf 100644 --- a/pages/goods/refuel-details/refuel-details.vue +++ b/pages/goods/refuel-details/refuel-details.vue @@ -1,502 +1,605 @@ - - - - - diff --git a/pages/goods/refuel-succes/refuel-succes.vue b/pages/goods/refuel-succes/refuel-succes.vue index e44f269..6cb378b 100644 --- a/pages/goods/refuel-succes/refuel-succes.vue +++ b/pages/goods/refuel-succes/refuel-succes.vue @@ -68,9 +68,9 @@ ¥{{orderInfo.deductionPrice}} - + diff --git a/pages/goods/refuel/refuel.vue b/pages/goods/refuel/refuel.vue index d088b05..fb1b4b6 100644 --- a/pages/goods/refuel/refuel.vue +++ b/pages/goods/refuel/refuel.vue @@ -306,11 +306,15 @@ ], onilName: '92#', latitudeful:'', - longitudeful:'' + longitudeful:'', + isTyAgent: false //是否是代理商 } }, onLoad() { let that = this; + if (app.globalData.accountId) { + that.isTyAgent = true; + } uni.getLocation({ type: 'wgs84', success: function(res) { @@ -396,7 +400,8 @@ latitude: this.latitudeful, longitude: this.longitudeful, pageNum: pagenum, - pageSize: this.pageSize + pageSize: this.pageSize, + isTyAgent: this.isTyAgent } getGasStoreList(params).then(res => { if (res.return_code == '000000') { diff --git a/pages/order/confirmation.vue b/pages/order/confirmation.vue index 4887a31..bbb604d 100644 --- a/pages/order/confirmation.vue +++ b/pages/order/confirmation.vue @@ -91,11 +91,11 @@ - 支付方式 积分充值 + 支付方式 积分充值 - 积分支付可用积分: {{user.gold}} @@ -105,7 +105,7 @@ - + diff --git a/pages/tabBar/home/home.vue b/pages/tabBar/home/home.vue index c1b5576..22dc7b9 100644 --- a/pages/tabBar/home/home.vue +++ b/pages/tabBar/home/home.vue @@ -65,7 +65,6 @@ - @@ -85,11 +84,13 @@ - - - + + + + + @@ -104,7 +105,8 @@ getTPigKFCToken, getTPigCinemaToken, getCmsContent, - getMembershipLevel + getMembershipLevel, + findByLatAndLng } from "../../../Utils/Api.js"; //您的api路径 import wybPopup from '../../../components/wyb-popup/wyb-popup.vue'; let app = getApp(); @@ -185,8 +187,8 @@ } }, onLoad(options) { + app.globalData.accountId = options.accountId; let that = this; - // 1.wx获取登录用户code // #ifdef MP uni.login({ @@ -346,7 +348,7 @@ success: function(res) { app.globalData.latitude = res.latitude; app.globalData.longitude = res.longitude; - that.getUserLocation(res.longitude, res.latitude); + // that.findByLatAndLng(res.longitude, res.latitude); // #ifdef MP uni.request({ url: 'https://apis.map.qq.com/ws/geocoder/v1/?location=' + res.latitude + @@ -368,14 +370,47 @@ that.getCmsContentcmshome(); that.getCmsContentcmsContent(); }, - fail() { + fail(err) { uni.hideLoading() } }) //#endif + }, + fail: (err) => { + if (err.errCode == 2) { + uni.showToast({ + title: '请开启系统定位', + duration: 3000, + icon: 'none' + }) + } } }) }, + //经纬度转换 + findByLatAndLng(item, item1) { + let that = this; + let datas = { + lng: item, + lat: item1 + } + findByLatAndLng(datas).then(res => { + if (res.return_code == '000000') { + that.city = res.return_data.result.addressComponent.province; + app.globalData.cityName = res.return_data.result.addressComponent + .province; + app.globalData.cityId = res.return_data.result.addressComponent.adcode; + // app.globalData.cityId = '500100'; + that.getCouponListArea(); + that.getCouponListgold(); + uni.hideLoading(); + that.getCmsContent(); + that.getCmsAactibity(); + that.getCmsContentcmshome(); + that.getCmsContentcmsContent(); + } + }); + }, //H5 获取openId getH5AccessToken(item) { let params = { @@ -449,7 +484,6 @@ }) .catch(err => { uni.hideLoading() - console.log(err); }); }, @@ -488,8 +522,8 @@ return; } this.productListleg = res.return_data.total; - }else{ - this.productList = []; + } else { + this.productList = []; } }) }, @@ -510,8 +544,8 @@ return; } this.goldproductListleg = res.return_data.total; - }else{ - this.productList = []; + } else { + this.productList = []; } }) }, @@ -675,13 +709,13 @@ url: '../../../subPages/preferred-goods/preferred-goods' }) return; - } - if (item.title == '优惠券包') { - uni.navigateTo({ - url:'../../../subPages/coupon-package/coupon-package' - }) - return; - } + } + if (item.title == '优惠券包') { + uni.navigateTo({ + url: '../../../subPages/coupon-package/coupon-package' + }) + return; + } }, @@ -704,13 +738,13 @@ .popImg { width: 300px; height: 440px; - } - - .xfimg{ - width: 80rpx; - bottom: 60rpx; - position: fixed; - right: 40rpx; + } + + .xfimg { + width: 80rpx; + bottom: 60rpx; + position: fixed; + right: 40rpx; } @font-face { @@ -1181,7 +1215,7 @@ .orange-content .swiper-item { height: 180rpx; margin-left: 14rpx; - margin-top: 14rpx; + margin-top: 14rpx; float: left; } diff --git a/subPages/recharge-centre/recharge-centre.vue b/subPages/recharge-centre/recharge-centre.vue index fc495cb..df3f9c8 100644 --- a/subPages/recharge-centre/recharge-centre.vue +++ b/subPages/recharge-centre/recharge-centre.vue @@ -21,7 +21,7 @@ {{item.price}}元 - {{item.discount}} 折 + {{item.discount}} 折 已售空 @@ -32,7 +32,7 @@ 1: - 此业务为话费慢充。日常72小时内到账,如遇月初、月末运营商高峰期或系统更新,到账时间会有一定延迟,敬请谅解。充值失败后系统会自动为您退款至原账户。急单请选择“6小时到账”充值端口,感谢您的支持! + 此业务为话费慢充。日常5个工作日内到账,如遇月初、月末运营商高峰期或系统更新,到账时间会有一定延迟,敬请谅解。充值失败后系统会自动为您退款至原账户。急单请选择“6小时到账”充值端口,感谢您的支持! @@ -139,7 +139,7 @@ amountList: [], price: '', amoutstatus: '', - tabs: ["72小时到账", "6小时到账"], //切换操作 + tabs: ["5个工作日", "6小时到账"], //切换操作 current: 0, //默认 swiperCurrent: 2 } diff --git a/subPages/unionComfirmation/unionComfirmation.vue b/subPages/unionComfirmation/unionComfirmation.vue index 7bea7b2..b57f01e 100644 --- a/subPages/unionComfirmation/unionComfirmation.vue +++ b/subPages/unionComfirmation/unionComfirmation.vue @@ -81,7 +81,7 @@ - + @@ -161,7 +161,9 @@ couponId: '', couponList: [], UserNormalDiscountList: [], - imageUrl: app.globalData.imgUrl, + imageUrl: app.globalData.imgUrl, + imagewxUrl: app.globalData.imageWxImg, + imgadres1: 'arrive_time_img.jpeg', deductionPrice: '0.00', paytheprice: '', radioStatus: true, diff --git a/uni.scss b/uni.scss index c950983..ba764cc 100644 --- a/uni.scss +++ b/uni.scss @@ -398,6 +398,10 @@ $uni-font-size-paragraph:30upx; .height70 { height: 70px; +} + +.height75 { + height: 75px; } .height80 {