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 a5a7d9d..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); @@ -237,7 +244,11 @@ export const hltUnionCardPay = params => { } export const bindHuiLianTongCard = params => { return POST('POST', `${base}/highUserCard/bindHuiLianTongCard`, params).then(res => res.data); -} +} +//手机短信登录 +export const loginByTel = params => { + return POST('POST', `${base}/wechat/loginByTel`, params).then(res => res.data); +} /** * 工会卡 */ @@ -342,7 +353,10 @@ export const generateCode = params => { export const highremark = params => { return POSTBREST('POST', `${brestBase}/highCouponAgent/remark`, params).then(res => res.data); } - +//查询兑换码 +export const getAgentConvertCodeCount = params => { + return POSTBREST('GET', `${brestBase}/highCouponAgent/getAgentConvertCodeCount`, params).then(res => res.data); +} // 查看二维码 export const getCodeById = params => { return POSTBREST('GET', `${brestBase}/highCouponAgent/getCodeById`, params).then(res => res.data); diff --git a/components/QS-tabs/QS-tabs.vue b/components/QS-tabs/QS-tabs.vue new file mode 100644 index 0000000..3f18146 --- /dev/null +++ b/components/QS-tabs/QS-tabs.vue @@ -0,0 +1,484 @@ + + + + + diff --git a/components/yy-video-player/yy-video-player.nvue b/components/yy-video-player/yy-video-player.nvue index e39a22a..5e8fa25 100644 --- a/components/yy-video-player/yy-video-player.nvue +++ b/components/yy-video-player/yy-video-player.nvue @@ -46,7 +46,6 @@ export default { }, processBarColor:{ type:String, - default:"#39BFFD" } }, data() { diff --git a/pages.json b/pages.json index 2e2af72..4bf1fd6 100644 --- a/pages.json +++ b/pages.json @@ -632,10 +632,20 @@ }, { "path": "trade-union-recharge/trade-union-recharge", "style": { - "navigationBarTitleText": "工会卡充值", - "backgroundTextStyle": "light", - "navigationBarBackgroundColor": "#0083f5", - "backgroundColorTop": "#0083f5", + "navigationBarTitleText": "工会卡充值", + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#0083f5", + "backgroundColorTop": "#0083f5", + "navigationBarTextStyle": "white" + } + + }, { + "path": "union-card-success/union-card-success", + "style": { + "navigationBarTitleText": "充值成功", + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#0083f5", + "backgroundColorTop": "#0083f5", "navigationBarTextStyle": "white" } diff --git a/pages/goods/coupons-info-details/coupons-info-details.vue b/pages/goods/coupons-info-details/coupons-info-details.vue index c6c92b5..c94021d 100644 --- a/pages/goods/coupons-info-details/coupons-info-details.vue +++ b/pages/goods/coupons-info-details/coupons-info-details.vue @@ -27,19 +27,27 @@ 备注:{{couponDesInfo.couponAgentCode.remark}} - - 核销码(商户扫客户) - + + 核销码(商户扫客户) + 请告知加油员用码商支付 - + - + 点击下方复制按钮,复制兑换码发送用户 {{couponDesInfo.couponAgentCode.convertCode}} 复制兑换码 - + + diff --git a/pages/goods/goods.vue b/pages/goods/goods.vue index 6462245..ac3e8de 100644 --- a/pages/goods/goods.vue +++ b/pages/goods/goods.vue @@ -22,7 +22,7 @@ - + diff --git a/pages/goods/refuel-confirm/refuel-confirm.vue b/pages/goods/refuel-confirm/refuel-confirm.vue index dfdc36f..a289b14 100644 --- a/pages/goods/refuel-confirm/refuel-confirm.vue +++ b/pages/goods/refuel-confirm/refuel-confirm.vue @@ -1,413 +1,467 @@ - 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 f418e69..bbb604d 100644 --- a/pages/order/confirmation.vue +++ b/pages/order/confirmation.vue @@ -90,12 +90,12 @@ - - 支付方式 + + 支付方式 积分充值 - 积分支付可用积分: {{user.gold}} @@ -105,7 +105,7 @@ - + @@ -116,8 +116,8 @@ - - + + 汇联通工会卡可用余额: {{tongCardPrice}}元 @@ -168,10 +168,10 @@ - + {{items.highDiscount.discountName}} - 有效期至:{{items.highDiscount.salesEndTime | formatDate('-')}} + 有效期至:{{items.useEndTime | formatDate('-')}} @@ -227,8 +227,9 @@ jumpType: '', tongCardPrice: 0, storeId: '', - isDiscont: false, - coupondiscountid:'' + isDiscont: false, + coupondiscountid: '', + orderDetails:'' //订单详情 }; }, @@ -309,24 +310,24 @@ this.$refs.popup.show(); }, radioChanges(item) { - if (this.memDiscountId == item.highDiscount.id) { // 如果已经选中,则取消选中 - this.memDiscountId = ''; + if (this.memDiscountId == item.id) { // 如果已经选中,则取消选中 + this.memDiscountId = ''; this.coupondiscountid = ''; this.paytheprice = this.couponList.discountPrice; this.deductionPrice = '0.00'; this.isDiscont = false; } else { // 否则进行选中赋值 this.isDiscont = true; - this.memDiscountId = item.highDiscount.id; + this.memDiscountId = item.id; this.coupondiscountid = item.id; if (item.highDiscount.discountType == 1) { //满减价格 this.deductionPrice = item.highDiscount.discountPrice; - this.paytheprice = this.couponList.salesPrice - this.deductionPrice; + this.paytheprice = parseFloat(this.couponList.salesPrice - this.deductionPrice).toFixed(2); } else if (item.highDiscount.discountType == 2) { //抵扣价格 this.deductionPrice = item.highDiscount.discountPrice; - this.paytheprice = this.couponList.salesPrice - this.deductionPrice; + this.paytheprice = parseFloat(this.couponList.salesPrice - this.deductionPrice).toFixed(2); } else if (item.highDiscount.discountType == 3) { // 打折 this.deductionPrice = parseFloat(this.couponList.salesPrice - (this.couponList.salesPrice * @@ -414,7 +415,11 @@ duration: 2000 }) return; - } + } + if(this.orderDetails){ + this.orderToPay(this.orderDetails); + return; + } uni.showLoading({ title: '提交订单中...' }) @@ -441,7 +446,8 @@ // .highChildOrderList[0].ext1 // }) this.jumpType = res.return_data.highChildOrderList[0].ext1; - this.orderId = res.return_data.id; + this.orderId = res.return_data.id; + this.orderDetails = res.return_data; this.orderToPay(res.return_data); } else { uni.hideLoading(); @@ -731,7 +737,13 @@ duration: 4000 }); }); - }, + }, + //跳转积分充值 + jumpdeposits(){ + uni.navigateTo({ + url:'../user/deposit/deposit' + }) + } } } @@ -917,7 +929,7 @@ align-items: center; .sum { - width: 50%; + width: 68%; font-size: 18px; margin-right: 10upx; display: flex; @@ -930,7 +942,7 @@ } .btn { - padding: 0 50rpx; + padding: 0 45rpx; height: 80rpx; background-color: #0083f5; color: #fff; @@ -943,6 +955,17 @@ } } + .jfrecharge { + background-color: #0083f5; + padding: 5px 20rpx; + color: #fff; + margin-left: 50%; + justify-content: center; + align-items: center; + font-size: 30rpx; + border-radius: 40rpx; + } + .goods-list { width: 100%; padding: 0; diff --git a/pages/pay/payment/payment.vue b/pages/pay/payment/payment.vue index 42f0118..56dea76 100644 --- a/pages/pay/payment/payment.vue +++ b/pages/pay/payment/payment.vue @@ -18,7 +18,7 @@ - + @@ -29,7 +29,7 @@ - + diff --git a/pages/tabBar/home/home.vue b/pages/tabBar/home/home.vue index 8547f90..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 = []; } }) }, @@ -581,18 +615,18 @@ //跳转菜单 toCategory(item) { - if (!app.globalData.userInfo.phone) { - uni.navigateTo({ - url: '../../userLogin/userLogin' - }) - return; - } - if (!app.globalData.userInfo) { - uni.navigateTo({ - url: '../../userLogin/userLogin' - }) - return; - } + // if (!app.globalData.userInfo.phone) { + // uni.navigateTo({ + // url: '../../userLogin/userLogin' + // }) + // return; + // } + // if (!app.globalData.userInfo) { + // uni.navigateTo({ + // url: '../../userLogin/userLogin' + // }) + // return; + // } if (item.title == '在线加油') { uni.navigateTo({ url: item.ext1 @@ -628,18 +662,18 @@ }, //单独跳转话费充值 jumphuafei(item) { - if (!app.globalData.userInfo) { - uni.navigateTo({ - url: '../../userLogin/userLogin' - }) - return; - } - if (!app.globalData.userInfo.phone) { - uni.navigateTo({ - url: '../../userLogin/userLogin' - }) - return; - } + // if (!app.globalData.userInfo) { + // uni.navigateTo({ + // url: '../../userLogin/userLogin' + // }) + // return; + // } + // if (!app.globalData.userInfo.phone) { + // uni.navigateTo({ + // url: '../../userLogin/userLogin' + // }) + // return; + // } if (item.title == '汇联通') { uni.navigateTo({ url: '/pages/goods/goods-list/goods-list?id=2' @@ -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 { @@ -1182,6 +1216,7 @@ height: 180rpx; margin-left: 14rpx; margin-top: 14rpx; + float: left; } .orange-content .swiper-item .img { diff --git a/pages/tabBar/user/user.vue b/pages/tabBar/user/user.vue index 93a5725..530bfb8 100644 --- a/pages/tabBar/user/user.vue +++ b/pages/tabBar/user/user.vue @@ -24,18 +24,18 @@ @@ -231,7 +231,7 @@ }, { url: '../../login/login?id=2', - text: '我的推广', + text: '代理商登录', img: 'user/renw.png' } diff --git a/pages/user/agentCoupons/agentCoupons.vue b/pages/user/agentCoupons/agentCoupons.vue index e23bd9f..be28572 100644 --- a/pages/user/agentCoupons/agentCoupons.vue +++ b/pages/user/agentCoupons/agentCoupons.vue @@ -31,9 +31,9 @@ + v-if="typeId == 2 && (typeid == 2 || typeid == 3) ">查看详情 + v-if="typeId == 2 && (typeid == 2 || typeid == 3) && agent.remark !=null "> 备注:{{agent.remark}} @@ -127,7 +127,7 @@ return false; } let pagenum = this.pageNum; - let params; + let params; if (this.typeId == 1) { if (this.typeid == 1) { params = { @@ -155,11 +155,19 @@ type: 1, pageSize: this.pageSize } - } else { + } else if(this.typeid == 2){ params = { pageNum: pagenum, couponId: this.couponId, - status: '2,3', + status: 2, + type: 2, + pageSize: this.pageSize + } + }else if(this.typeid == 3){ + params = { + pageNum: pagenum, + couponId: this.couponId, + status: 3, type: 2, pageSize: this.pageSize } diff --git a/pages/user/cardDes/cardDes.vue b/pages/user/cardDes/cardDes.vue index 355963b..e692650 100644 --- a/pages/user/cardDes/cardDes.vue +++ b/pages/user/cardDes/cardDes.vue @@ -1,121 +1,129 @@ - - - - - diff --git a/pages/user/deposit/deposit.vue b/pages/user/deposit/deposit.vue index 32078e1..9d376aa 100644 --- a/pages/user/deposit/deposit.vue +++ b/pages/user/deposit/deposit.vue @@ -36,17 +36,6 @@ - @@ -85,11 +74,11 @@ data() { return { inputAmount: '', //金额 - amountList: [10, 50, 100], //预设3个可选快捷金额 + amountList: [100, 200, 300, 500, 800, 1000], //预设3个可选快捷金额 paytype: 'wxpay', //支付类型 user: "", imagewxUrl: app.globalData.imageWxImg, - imgadres:'wxpay.png' + imgadres: 'wxpay.png' }; }, onLoad() { @@ -126,7 +115,7 @@ title: '正在提交订单...' }) let goods = { - "identificationCode":app.globalData.identificationCode, + "identificationCode": app.globalData.identificationCode, "highChildOrderList": [{ "goodsType": 2, "goodsId": app.globalData.userInfo.id, @@ -214,10 +203,10 @@ jweixin.chooseWXPay({ appId: self.return_data.appId, timestamp: self.return_data - .timeStamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符 + .timeStamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符 nonceStr: self.return_data.nonceStr, // 支付签名随机串,不长于 32 位 package: self.return_data - .package, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=***) + .package, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=***) signType: 'MD5', // 签名方式,默认为'SHA1',使用新版支付需传入'MD5' paySign: self.return_data.sign, // 支付签名 success: function(res) { @@ -271,19 +260,22 @@ width: 100%; .list { - display: flex; + display: flow-root; justify-content: space-between; padding: 20upx 0; .box { width: 30%; - height: 120upx; + height: 120rpx; + float: left; + margin-left: 3.333%; + margin-top: 20px; display: flex; justify-content: center; align-items: center; - border-radius: 10upx; - box-shadow: 0upx 5upx 20upx rgba(0, 0, 0, 0.05); - font-size: 36upx; + border-radius: 10rpx; + box-shadow: 0rpx 5rpx 20rpx rgba(0, 0, 0, 0.05); + font-size: 36rpx; background-color: #f1f1f1; color: 333; @@ -295,14 +287,14 @@ } .num { - margin-top: 10upx; + margin-top: 20upx; display: flex; justify-content: flex-end; align-items: center; .text { padding-right: 10upx; - font-size: 30upx; + font-size: 40upx; } .input { @@ -315,7 +307,7 @@ input { margin: 0 20upx; height: 60upx; - font-size: 30upx; + font-size: 40upx; color: #0083f5; justify-content: flex-end; align-items: center; @@ -395,4 +387,4 @@ } } } - + diff --git a/pages/user/mineCouponsDestails/mineCouponsDestails.vue b/pages/user/mineCouponsDestails/mineCouponsDestails.vue index 5b08f62..ea02994 100644 --- a/pages/user/mineCouponsDestails/mineCouponsDestails.vue +++ b/pages/user/mineCouponsDestails/mineCouponsDestails.vue @@ -1,200 +1,246 @@ - - - - - diff --git a/pages/user/minePromotion/minePromotion.vue b/pages/user/minePromotion/minePromotion.vue index deeba7b..350abac 100644 --- a/pages/user/minePromotion/minePromotion.vue +++ b/pages/user/minePromotion/minePromotion.vue @@ -1,6 +1,6 @@