diff --git a/App.vue b/App.vue index 80e20c0..5a54d7e 100644 --- a/App.vue +++ b/App.vue @@ -20,6 +20,7 @@ token: '', brestToken:'', cityId: '', + cityName:'', longitude : '', latitude : '' }, diff --git a/Utils/Api.js b/Utils/Api.js index 9409ab1..d84e19f 100644 --- a/Utils/Api.js +++ b/Utils/Api.js @@ -140,6 +140,12 @@ export const getGasDetailByStoreKey = params => { return POST('GET', `${base}/highGas/getGasDetailByStoreKey`, params).then(res => res.data); } +//获取已开通的省份 +export const getDredgeProvince = params => { + return POST('GET', `${base}/common/getDredgeProvince`, params).then(res => res.data); +} + + /** * H5 获取用户信息 */ diff --git a/pages copy.json b/pages copy.json index 3085e89..aec8c41 100644 --- a/pages copy.json +++ b/pages copy.json @@ -58,8 +58,8 @@ "style": { "enablePullDownRefresh": true, "backgroundTextStyle": "light", - "navigationBarBackgroundColor": "#f06c7a", - "backgroundColorTop": "#f06c7a", + "navigationBarBackgroundColor": "#0083f5", + "backgroundColorTop": "#0083f5", "navigationBarTextStyle": "white", "app-plus": { "titleNView": false, //禁用原生导航栏 @@ -109,7 +109,7 @@ "path": "pages/login/login", "style": { "navigationBarTitleText": "登录", - "navigationBarBackgroundColor": "#f06c7a", + "navigationBarBackgroundColor": "#0083f5", "navigationBarTextStyle": "white", "app-plus": { "bounce": "none", //关闭窗口回弹效果 @@ -121,7 +121,7 @@ "path": "pages/login/register", "style": { "navigationBarTitleText": "手机号登录", - "navigationBarBackgroundColor": "#f06c7a", + "navigationBarBackgroundColor": "#0083f5", "navigationBarTextStyle": "white", "app-plus": { "bounce": "none", //关闭窗口回弹效果 @@ -133,7 +133,7 @@ "path": "pages/login/resetpasswd", "style": { "navigationBarTitleText": "重置密码", - "navigationBarBackgroundColor": "#f06c7a", + "navigationBarBackgroundColor": "#0083f5", "navigationBarTextStyle": "white", "app-plus": { "bounce": "none", //关闭窗口回弹效果 @@ -174,7 +174,7 @@ "path": "pages/user/coupon/coupon", "style": { "navigationBarTitleText": "优惠券", - "navigationBarBackgroundColor": "#f06c7a", + "navigationBarBackgroundColor": "#0083f5", "navigationBarTextStyle": "white", "app-plus": { "bounce": "none" @@ -184,7 +184,7 @@ "path": "pages/user/keep/keep", "style": { "navigationBarTitleText": "我的收藏", - "navigationBarBackgroundColor": "#f06c7a", + "navigationBarBackgroundColor": "#0083f5", "navigationBarTextStyle": "white", "app-plus": { "bounce": "none" @@ -268,7 +268,7 @@ }, "tabBar": { "color": "#333333", - "selectedColor": "#f06c7a", + "selectedColor": "#0083f5", "borderStyle": "black", "backgroundColor": "#ffffff", "list": [{ @@ -297,4 +297,4 @@ } ] } -} +} diff --git a/pages/goods/goods-list/goods-list.vue b/pages/goods/goods-list/goods-list.vue index c6236cd..6b824cd 100644 --- a/pages/goods/goods-list/goods-list.vue +++ b/pages/goods/goods-list/goods-list.vue @@ -1,27 +1,27 @@ @@ -30,219 +30,219 @@ export default { data() { return { - goodsList:[ - { goods_id: 0, img: '/static/img/goods/p1.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' }, - { goods_id: 1, img: '/static/img/goods/p2.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' }, - { goods_id: 2, img: '/static/img/goods/p3.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' }, - { goods_id: 3, img: '/static/img/goods/p4.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' }, - { goods_id: 4, img: '/static/img/goods/p5.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' }, - { goods_id: 5, img: '/static/img/goods/p6.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' }, - { goods_id: 6, img: '/static/img/goods/p7.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' }, - { goods_id: 7, img: '/static/img/goods/p8.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' }, - { goods_id: 8, img: '/static/img/goods/p9.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' }, - { goods_id: 9, img: '/static/img/goods/p10.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' } - ], - loadingText:"正在加载...", - headerTop:"0px", - headerPosition:"fixed", - orderbyList:[ - {text:"销量",selected:true,orderbyicon:false,orderby:0}, - {text:"价格",selected:false,orderbyicon:['sheng','jiang'],orderby:0}, - {text:"好评",selected:false,orderbyicon:false,orderby:0} - ], + goodsList:[ + { goods_id: 0, img: '/static/img/goods/p1.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' }, + { goods_id: 1, img: '/static/img/goods/p2.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' }, + { goods_id: 2, img: '/static/img/goods/p3.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' }, + { goods_id: 3, img: '/static/img/goods/p4.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' }, + { goods_id: 4, img: '/static/img/goods/p5.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' }, + { goods_id: 5, img: '/static/img/goods/p6.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' }, + { goods_id: 6, img: '/static/img/goods/p7.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' }, + { goods_id: 7, img: '/static/img/goods/p8.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' }, + { goods_id: 8, img: '/static/img/goods/p9.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' }, + { goods_id: 9, img: '/static/img/goods/p10.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' } + ], + loadingText:"正在加载...", + headerTop:"0px", + headerPosition:"fixed", + orderbyList:[ + {text:"销量",selected:true,orderbyicon:false,orderby:0}, + {text:"价格",selected:false,orderbyicon:['sheng','jiang'],orderby:0}, + {text:"好评",selected:false,orderbyicon:false,orderby:0} + ], orderby:"sheng" }; - }, - onLoad: function (option) { //option为object类型,会序列化上个页面传递的参数 - console.log(option.cid); //打印出上个页面传递的参数。 - uni.setNavigationBarTitle({ - title: option.name - }); - - //兼容H5下排序栏位置 - // #ifdef H5 - //定时器方式循环获取高度为止,这么写的原因是onLoad中head未必已经渲染出来。 - let Timer = setInterval(()=>{ - let uniHead = document.getElementsByTagName('uni-page-head'); - if(uniHead.length>0){ - this.headerTop = uniHead[0].offsetHeight+'px'; - clearInterval(Timer);//清除定时器 - } - },1); - // #endif - }, - onPageScroll(e){ - //兼容iOS端下拉时顶部漂移 - if(e.scrollTop>=0){ - this.headerPosition = "fixed"; - }else{ - this.headerPosition = "absolute"; - } - }, - //下拉刷新,需要自己在page.json文件中配置开启页面下拉刷新 "enablePullDownRefresh": true - onPullDownRefresh() { - setTimeout(()=>{ - this.reload(); - uni.stopPullDownRefresh(); - }, 1000); - }, - //上拉加载,需要自己在page.json文件中配置"onReachBottomDistance" - onReachBottom(){ - uni.showToast({title: '触发上拉加载'}); - let len = this.goodsList.length; - if(len>=40){ - this.loadingText="到底了"; - return false; - }else{ - this.loadingText="正在加载..."; - } - let end_goods_id = this.goodsList[len-1].goods_id; - for(let i=1;i<=10;i++){ - let goods_id = end_goods_id+i; - let p = { goods_id: goods_id, img: '/static/img/goods/p'+(goods_id%10==0?10:goods_id%10)+'.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' }; - this.goodsList.push(p); - } - }, - methods:{ - reload(){ - console.log("reload"); - let tmpArr = [] - this.goodsList = []; - let end_goods_id = 0; - for(let i=1;i<=10;i++){ - let goods_id = end_goods_id+i; - let p = { goods_id: goods_id, img: '/static/img/goods/p'+(goods_id%10==0?10:goods_id%10)+'.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' }; - this.goodsList.push(p); - } - }, - //商品跳转 - toGoods(e){ - uni.showToast({title: '商品'+e.goods_id,icon:"none"}); - uni.navigateTo({ - url: '../goods' - }); - }, - //排序类型 - select(index){ - let tmpTis = this.orderbyList[index].text+"排序 " - if(this.orderbyList[index].orderbyicon){ - let type = this.orderbyList[index].orderby==0?'升序':'降序'; - if(this.orderbyList[index].selected){ - type = this.orderbyList[index].orderby==0?'降序':'升序'; - this.orderbyList[index].orderby = this.orderbyList[index].orderby==0?1:0; - } - tmpTis+=type - } - this.orderbyList[index].selected = true; - let len = this.orderbyList.length; - for(let i=0;i{ + let uniHead = document.getElementsByTagName('uni-page-head'); + if(uniHead.length>0){ + this.headerTop = uniHead[0].offsetHeight+'px'; + clearInterval(Timer);//清除定时器 + } + },1); + // #endif + }, + onPageScroll(e){ + //兼容iOS端下拉时顶部漂移 + if(e.scrollTop>=0){ + this.headerPosition = "fixed"; + }else{ + this.headerPosition = "absolute"; + } + }, + //下拉刷新,需要自己在page.json文件中配置开启页面下拉刷新 "enablePullDownRefresh": true + onPullDownRefresh() { + setTimeout(()=>{ + this.reload(); + uni.stopPullDownRefresh(); + }, 1000); + }, + //上拉加载,需要自己在page.json文件中配置"onReachBottomDistance" + onReachBottom(){ + uni.showToast({title: '触发上拉加载'}); + let len = this.goodsList.length; + if(len>=40){ + this.loadingText="到底了"; + return false; + }else{ + this.loadingText="正在加载..."; + } + let end_goods_id = this.goodsList[len-1].goods_id; + for(let i=1;i<=10;i++){ + let goods_id = end_goods_id+i; + let p = { goods_id: goods_id, img: '/static/img/goods/p'+(goods_id%10==0?10:goods_id%10)+'.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' }; + this.goodsList.push(p); + } + }, + methods:{ + reload(){ + console.log("reload"); + let tmpArr = [] + this.goodsList = []; + let end_goods_id = 0; + for(let i=1;i<=10;i++){ + let goods_id = end_goods_id+i; + let p = { goods_id: goods_id, img: '/static/img/goods/p'+(goods_id%10==0?10:goods_id%10)+'.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' }; + this.goodsList.push(p); + } + }, + //商品跳转 + toGoods(e){ + uni.showToast({title: '商品'+e.goods_id,icon:"none"}); + uni.navigateTo({ + url: '../goods' + }); + }, + //排序类型 + select(index){ + let tmpTis = this.orderbyList[index].text+"排序 " + if(this.orderbyList[index].orderbyicon){ + let type = this.orderbyList[index].orderby==0?'升序':'降序'; + if(this.orderbyList[index].selected){ + type = this.orderbyList[index].orderby==0?'降序':'升序'; + this.orderbyList[index].orderby = this.orderbyList[index].orderby==0?1:0; + } + tmpTis+=type + } + this.orderbyList[index].selected = true; + let len = this.orderbyList.length; + for(let i=0;i - diff --git a/pages/goods/goods.vue b/pages/goods/goods.vue index f06ed8e..6b8f420 100644 --- a/pages/goods/goods.vue +++ b/pages/goods/goods.vue @@ -102,9 +102,7 @@ - - @@ -981,7 +979,7 @@ } .buy { - background-color: #f06c7a; + background-color: #0083f5; } } } @@ -1262,4 +1260,4 @@ } } - + diff --git a/pages/goods/ratings/ratings.vue b/pages/goods/ratings/ratings.vue index 3dae4e7..c5c210f 100644 --- a/pages/goods/ratings/ratings.vue +++ b/pages/goods/ratings/ratings.vue @@ -1,72 +1,72 @@ @@ -74,315 +74,315 @@ - diff --git a/pages/goods/refuel-confirm/refuel-confirm.vue b/pages/goods/refuel-confirm/refuel-confirm.vue index 403b3b8..db16716 100644 --- a/pages/goods/refuel-confirm/refuel-confirm.vue +++ b/pages/goods/refuel-confirm/refuel-confirm.vue @@ -1,13 +1,13 @@ @@ -62,18 +201,22 @@ page { background-color: #f7f7f7; } - .conImg{ + + .conImg { width: 100px; height: 100px; border-radius: 8px; } - .conCont{ + + .conCont { margin-left: 115px; } + .slogan { color: #807c87; text-decoration: line-through; } + .footer { position: fixed; bottom: 0upx; @@ -86,7 +229,8 @@ display: flex; justify-content: space-between; align-items: center; - .reBtn{ + + .reBtn { width: 110px; background-color: #089bf5; color: #FFFFFF; diff --git a/pages/goods/refuel-details/refuel-details.vue b/pages/goods/refuel-details/refuel-details.vue index 04247c9..613fe50 100644 --- a/pages/goods/refuel-details/refuel-details.vue +++ b/pages/goods/refuel-details/refuel-details.vue @@ -7,7 +7,7 @@ {{storeList.gasName}} {{storeList.gasAddress}} - + {{storeList.distance}}km @@ -65,15 +65,16 @@ 加油金额 - - + - 约0.01L + 约{{litre}}L + :class="{'on':amount.price == inputMoney}"> {{amount.price}}元 @@ -81,9 +82,19 @@ - 合计: ¥0.00 + 合计: ¥{{totalPrice}} - + + + + + + + + + + @@ -110,7 +121,8 @@ diff --git a/pages/goods/refuel/refuel.vue b/pages/goods/refuel/refuel.vue index 388444a..d81c9c6 100644 --- a/pages/goods/refuel/refuel.vue +++ b/pages/goods/refuel/refuel.vue @@ -8,50 +8,75 @@ @result="result"> --> - 50km内 + {{distance}} + - 距离优先 + {{distanceName}} + - 92# + {{onilName}} + - + + + + + 暂无数据 + + + style="max-height: 80px;" @click="goDetails(item.store_key,item.id)"> - {{item.store_name}} - - + + {{item.store_name}} + + {{item.address}} - - 1.9km + + + {{item.distance}}km - + {{item.price_vip}}油站价¥{{item.price_gun}} - - 选择油枪 - 汽油油枪 - - - {{item.gunNo}} + + 筛选距离 + 优先条件 + 油号选择 + + + {{item.name}} - + + + {{item.name}} + + + + + {{item.name}} + + {{items.name}} + + + + + @@ -62,10 +87,12 @@ import slFilter from '@/components/sl-filter/sl-filter.vue'; import wybPopup from '../../../components/wyb-popup/wyb-popup.vue'; import uSearchBar from '../../../components/uni-search-bar/components/uni-search-bar/uni-search-bar.vue'; + import authorize from '../../../components/Authorize.vue' let app = getApp(); export default { components: { slFilter, + authorize, uSearchBar, wybPopup }, @@ -153,6 +180,9 @@ { 'title': '50km内', 'value': '50km内' + }, { + 'title': '2000km内', + 'value': '2000' } ] }, { @@ -173,20 +203,193 @@ pageNum: 1, pageSize: 10, isNoMoreData: false, - searname: '' + searname: '', + gunnumber: [{ + id: 1, + name: '6km内', + value: 6 + }, + { + id: 2, + name: '10km内', + value: 10 + }, + { + id: 3, + name: '15km内', + value: 15 + }, + { + id: 4, + name: '20km内', + value: 20 + }, + { + id: 5, + name: '50km内', + value: 50 + }, { + id: 6, + name: '2000km内', + value: 2000 + } + ], + distance: '6km内', + distanceNum: '6', + distanceName: '距离最近', + detailList: [{ + id: 1, + name: '距离最近' + }], + typeId: '', + oilList: [{ + id: 1, + name: '汽油', + nillist: [{ + id: 1, + name: '90#' + }, + { + id: 2, + name: '92#' + }, + { + id: 3, + name: '95#' + }, + { + id: 4, + name: '98#' + }, + { + id: 5, + name: '101#' + }, + { + id: 6, + name: '95(甲醇)#' + }, + { + id: 7, + name: '92(甲醇)#' + } + ] + }, + { + id: 2, + name: '柴油', + nillist: [{ + id: 1, + name: '-40#' + }, + { + id: 2, + name: '-35#' + }, + { + id: 3, + name: '-30#' + }, + { + id: 4, + name: '-20#' + }, + { + id: 5, + name: '-10#' + }, + { + id: 6, + name: '车队0#' + }, + { + id: 7, + name: '0#' + }, + { + id: 8, + name: '柴油#' + }, + ] + }, + { + id: 3, + name: '天然气', + nillist: [{ + id: 1, + name: 'CNG' + }, + { + id: 2, + name: 'LNG' + }, + { + id: 3, + name: 'LPG' + } + ] + } + ], + onilName: '90#', + latitudeful:'', + longitudeful:'' } }, onLoad() { - this.getGasStoreList(); + let that = this; + uni.getLocation({ + type: 'wgs84', + success: function(res) { + that.latitudeful = res.latitude; + that.longitudeful = res.longitude; + that.getGasStoreList(); + } + }) }, onReachBottom() { this.getGasStoreList(); }, methods: { + //筛选距离 + changeValue(item) { + this.distance = item.name; + this.distanceNum = item.value; + this.pageNum = 1; + this.isNoMoreData = false; + this.refuelList = []; + this.getGasStoreList(); + this.$refs.popup.hide(); + }, + + seeloaction(item) { + uni.openLocation({ + latitude: Number(item.latitude), //目的地的定位 + longitude: Number(item.longitude), //目的地的定位 + name: item.store_name, + address: item.address + }) + }, + changeValue1(item) { + this.distanceName = item.name; + this.pageNum = 1; + this.isNoMoreData = false; + this.refuelList = []; + this.getGasStoreList(); + this.$refs.popup.hide(); + }, + + changeValue2(item) { + this.onilName = item.name; + this.pageNum = 1; + this.isNoMoreData = false; + this.refuelList = []; + this.getGasStoreList(); + this.$refs.popup.hide(); + }, //显示弹出 showPopup(item) { - this.$refs.popup.show(); this.typeId = item; + this.$refs.popup.show(); }, search(res) { uni.showToast({ @@ -213,11 +416,11 @@ let pagenum = this.pageNum; let params = { storeName: this.searname, - distance: '999', - regionId: '110000', - oilNoName: '92#', - latitude: app.globalData.latitude, - longitude: app.globalData.longitude, + distance: this.distanceNum, + regionId: app.globalData.cityId, + oilNoName: this.onilName, + latitude: this.latitudeful, + longitude: this.longitudeful, pageNum: pagenum, pageSize: this.pageSize } @@ -237,9 +440,9 @@ }) }, //跳转详情 - goDetails(items) { + goDetails(items, itemId) { uni.navigateTo({ - url: '../refuel-details/refuel-details?id=' + items + url: '../refuel-details/refuel-details?id=' + items + '&desId=' + itemId }) }, result(val) { @@ -252,7 +455,33 @@ + diff --git a/pages/pay/payment/payment.vue b/pages/pay/payment/payment.vue index 8abf172..1b3f160 100644 --- a/pages/pay/payment/payment.vue +++ b/pages/pay/payment/payment.vue @@ -32,7 +32,7 @@ 金币支付 - + @@ -43,7 +43,7 @@ 微信支付 - + @@ -350,7 +350,7 @@ justify-content: center; align-items: center; color: #fff; - background-color: #f06c7a; + background-color: #0083f5; box-shadow: 0upx 5upx 10upx rgba(0, 0, 0, 0.2); } @@ -368,4 +368,4 @@ } } } - + diff --git a/pages/tabBar/cart/cart.vue b/pages/tabBar/cart/cart.vue index 73c69cf..e324fb9 100644 --- a/pages/tabBar/cart/cart.vue +++ b/pages/tabBar/cart/cart.vue @@ -312,7 +312,7 @@ width: 35upx; height: 35upx; border-radius: 100%; - border: solid 2upx #f06c7a; + border: solid 2upx #0083f5; display: flex; justify-content: center; align-items: center; @@ -320,7 +320,7 @@ width: 25upx; height: 25upx; border-radius: 100%; - background-color: #f06c7a; + background-color: #0083f5; } } .text{ @@ -542,8 +542,8 @@ bottom: 0upx; z-index: 5; .delBtn{ - border: solid 1upx #f06c7a; - color: #f06c7a; + border: solid 1upx #0083f5; + color: #0083f5; padding: 0 30upx; height: 50upx; border-radius: 30upx; @@ -569,7 +569,7 @@ .btn{ padding: 0 30upx; height: 50upx; - background-color: #f06c7a; + background-color: #0083f5; color: #fff; display: flex; justify-content: center; @@ -579,4 +579,4 @@ } } } - + diff --git a/pages/tabBar/category/category.vue b/pages/tabBar/category/category.vue index fc930a0..cf1b818 100644 --- a/pages/tabBar/category/category.vue +++ b/pages/tabBar/category/category.vue @@ -3,8 +3,9 @@ - - {{city}} + + + {{city}} @@ -91,15 +92,20 @@ } }, onLoad() { - this.postionIng(); }, - - + onShow() { + this.categoryList = []; + this.MerchantList = []; + if (app.globalData.cityName != '') { + this.city = app.globalData.cityName; + this.getMerchantList(); + }else{ + this.postionIng(); + } + + }, methods: { postionIng() { - uni.showLoading({ - title: '加载中' - }) let that = this; uni.getLocation({ type: 'wgs84', @@ -120,7 +126,6 @@ app.globalData.cityId = res.data.result.ad_info.adcode; // app.globalData.cityId = '500100'; that.getMerchantList(); - uni.hideLoading() } }) // #endif @@ -142,31 +147,28 @@ ''); app.globalData.cityId = res.result.ad_info.adcode; vm.getMerchantList(); - uni.hideLoading() }) .catch(err => { - uni.hideLoading() console.log(err); }); }, // 商户列表 getMerchantList() { - uni.showLoading({ - title: '加载中...' - }) - let params = { regionId: app.globalData.cityId } getMerchantList(params).then(res => { - if (res.return_code == '000000') { + if (res.return_code == '000000' && res.return_data !='') { this.MerchantList = res.return_data; this.getStoreListByMerchant(res.return_data[0].id); - setTimeout(function() { - uni.hideLoading(); - }, 2000); + } else { - uni.hideLoading() + this.MerchantList = []; + uni.showToast({ + title: '暂无数据', + icon: 'none', + duration: 2000 + }) } }) }, @@ -189,6 +191,12 @@ }); }, + //跳转位置 + goPostion() { + uni.navigateTo({ + url: '/pages/user/positioning/positioning' + }) + }, //门店列表 getStoreListByMerchant(item) { uni.showLoading({ @@ -201,14 +209,11 @@ latitude: app.globalData.latitude } getStoreListByMerchant(params).then(res => { + uni.hideLoading(); if (res.return_code == '000000') { this.categoryList = res.return_data - setTimeout(function() { - uni.hideLoading(); - }, 2000); } else { this.categoryList = []; - uni.hideLoading() } }) @@ -272,7 +277,7 @@ position: fixed; top: 0; z-index: 10; - background-color: #fff; + background-color: #0083f5; /* #ifdef APP-PLUS */ top: var(--status-bar-height); /* #endif */ @@ -281,10 +286,10 @@ width: 120upx; height: 60upx; flex-shrink: 0; + color: #FFFFFF; display: flex; align-items: center; font-size: 28upx; - .icon { height: 60upx; margin-right: 5upx; @@ -297,9 +302,9 @@ .input-box { width: 100%; - height: 60upx; - background-color: #f5f5f5; - border-radius: 30upx; + height: 70rpx; + background-color: #f5f5f5; + border-radius: 10rpx; position: relative; display: flex; align-items: center; @@ -406,7 +411,7 @@ width: 10upx; height: 80%; top: 10%; - background-color: #f06c7a; + background-color: #0083f5; } } } @@ -465,4 +470,4 @@ } } } - + diff --git a/pages/tabBar/home/home.vue b/pages/tabBar/home/home.vue index da75662..1264af0 100644 --- a/pages/tabBar/home/home.vue +++ b/pages/tabBar/home/home.vue @@ -8,8 +8,8 @@ :style="{ position: headerPosition,top:headerTop,opacity: afterHeaderOpacity }"> - - {{ city }} + + {{ city }} @@ -58,8 +58,8 @@ - - + + {{pro.couponName}} @@ -74,8 +74,8 @@ - - + + {{item.couponName}} ¥{{ item.discountPrice}} @@ -84,7 +84,7 @@ - + - + - + @@ -212,23 +212,23 @@ categoryList: [{ id: 1, name: '团油', - img: '/static/img/wxpay.png', + img: '/static/img/user/momey.png', src: '/pages/goods/refuel/refuel' }, { id: 2, - name: '家电', - img: '/static/img/wxpay.png' + name: '电影票', + img: '/static/img/user/momey.png' }, { id: 3, - name: '服饰', - img: '/static/img/wxpay.png' + name: '肯德基', + img: '/static/img/user/momey.png' }, { id: 4, - name: '日用', - img: '/static/img/wxpay.png' + name: '话费充值', + img: '/static/img/user/momey.png' } ], //切换状态 @@ -248,6 +248,11 @@ this.getH5AccessToken(arr2[1]); } // #endif + if (app.globalData.cityName != '') { + this.city = app.globalData.cityName; + this.getCouponListArea(); + this.getCouponListgold(); + } }, onLoad() { // 1.wx获取登录用户code @@ -317,6 +322,8 @@ success: function(res) { that.city = res.data.result.address_component.city.replace(/市/g, ''); + app.globalData.cityName = res.data.result.address_component.city + .replace(/市/g, ''); app.globalData.cityId = res.data.result.ad_info.adcode; // app.globalData.cityId = '500100'; that.getCouponListArea(); @@ -395,8 +402,8 @@ location: locationObj }) .then(res => { - vm.city = res.result.address_component.city.replace(/市/g, - ''); + vm.city = res.result.address_component.city.replace(/市/g, ''); + app.globalData.cityName = res.result.address_component.city.replace(/市/g, ''); app.globalData.cityId = res.result.ad_info.adcode; vm.getCouponListArea(); vm.getCouponListgold(); @@ -414,11 +421,17 @@ }) }, //跳转位置 - goPostion(){ + goPostion() { uni.navigateTo({ - url:'/pages/user/positioning/positioning' + url: '/pages/user/positioning/positioning' }) }, + //商品跳转 + toGoods(e) { + uni.navigateTo({ + url: '../../goods/goods?id='+e + }); + }, //扫码 toScan() { uni.scanCode({ @@ -503,10 +516,17 @@ }, //跳转菜单 toCategory(item) { - uni.navigateTo({ - url: item.src - }) - + if(item.name == '团油'){ + uni.navigateTo({ + url: item.src + }) + }else{ + uni.showToast({ + title: '暂未开通', + icon: 'none', + duration: 2000 + }) + } } } }; @@ -591,9 +611,9 @@ .input-box { width: 100%; - height: 60upx; + height: 70rpx; background-color: #f5f5f5; - border-radius: 30upx; + border-radius: 10rpx; position: relative; display: flex; align-items: center; @@ -761,7 +781,7 @@ view { height: 30upx; - background-color: #f06c7a; + background-color: #0083f5; display: flex; justify-content: center; align-items: center; @@ -964,7 +984,7 @@ } .orange-content { - height: 160px; + height: 170px; width: 90%; margin-left: 5%; border-radius: 0 0 10px 10px; @@ -1004,4 +1024,4 @@ color: #777; font-size: 28rpx; } - + diff --git a/pages/tabBar/user/user.vue b/pages/tabBar/user/user.vue index 88abcb7..51c728e 100644 --- a/pages/tabBar/user/user.vue +++ b/pages/tabBar/user/user.vue @@ -53,7 +53,7 @@ 我的订单 - @@ -149,15 +149,13 @@ { text: '已完成', icon: "shouhuo" - }, - // { - // text: '已退款', - // icon: "pingjia" - // }, - { + },{ + text: '已退款', + icon: "tuihuo" + },{ text: '已取消', icon: "pingjia" - }, + } ], // 工具栏列表 mytoolbarList: [{ @@ -196,12 +194,13 @@ url: '../../login/login?id=2', text: '我的推广', img: '/static/img/user/renw.png' - }, - { - url: '/pages/user/Charge/Charge', - text: '充话费', - img: '/static/img/user/bank.png' } + // , + // { + // url: '/pages/user/Charge/Charge', + // text: '充话费', + // img: '/static/img/user/bank.png' + // } ] } }, @@ -371,7 +370,7 @@ height: 0; position: fixed; z-index: 10; - background-color: #f06c7a; + background-color: #0083f5; top: 0; /* #ifdef APP-PLUS */ height: var(--status-bar-height);//覆盖样式 @@ -389,7 +388,7 @@ position: fixed; top: 0; z-index: 10; - background-color: #f06c7a; + background-color: #0083f5; /* #ifdef APP-PLUS */ top: var(--status-bar-height); /* #endif */ @@ -419,7 +418,7 @@ height: 0; position: fixed; z-index: 10; - background-color: #f06c7a; + background-color: #0083f5; top: 0; /* #ifdef APP-PLUS */ height: var(--status-bar-height); //覆盖样式 @@ -437,7 +436,7 @@ position: fixed; top: 0; z-index: 10; - background-color: #f06c7a; + background-color: #0083f5; /* #ifdef APP-PLUS */ top: var(--status-bar-height); @@ -461,7 +460,7 @@ } .place { - background-color: #f06c7a; + background-color: #0083f5; padding-left: 20px; padding-right: 20px; text-align: right; @@ -486,7 +485,7 @@ display: flex; align-items: center; // position: relative; - background-color: #f06c7a; + background-color: #0083f5; padding-bottom: 40rpx; .left { @@ -728,4 +727,4 @@ } } } - + diff --git a/pages/user/Charge/Charge.vue b/pages/user/Charge/Charge.vue index adb6530..5e35c0c 100644 --- a/pages/user/Charge/Charge.vue +++ b/pages/user/Charge/Charge.vue @@ -125,9 +125,9 @@ box-shadow: 0upx 5upx 20upx rgba(0,0,0,0.05); font-size: 36upx; background-color: #f1f1f1; - color: #f06c7a; + color: #0083f5; &.on{ - background-color: #f06c7a; + background-color: #0083f5; color: #ffffff; } } @@ -161,7 +161,7 @@ margin: 0 20upx; height: 60upx; font-size: 30upx; - color: #f06c7a; + color: #0083f5; justify-content: flex-end; align-items: center; } @@ -214,7 +214,7 @@ justify-content: center; align-items: center; color: #fff; - background-color: #f06c7a; + background-color: #0083f5; box-shadow: 0upx 5upx 10upx rgba(0,0,0,0.2); } .tis{ diff --git a/pages/user/address/address.vue b/pages/user/address/address.vue index bf87f46..4004de2 100644 --- a/pages/user/address/address.vue +++ b/pages/user/address/address.vue @@ -1,239 +1,239 @@ - diff --git a/pages/user/address/edit/edit.vue b/pages/user/address/edit/edit.vue index a951b78..9ae3685 100644 --- a/pages/user/address/edit/edit.vue +++ b/pages/user/address/edit/edit.vue @@ -1,261 +1,261 @@ - - diff --git a/pages/user/business/business.vue b/pages/user/business/business.vue index 6b4fb13..43526db 100644 --- a/pages/user/business/business.vue +++ b/pages/user/business/business.vue @@ -43,10 +43,10 @@ let datas = { "code": res.result } - useCouponCode(datas).then(res => { + useCouponCode(datas).then(res => { if (res.return_code == '000000') { uni.showToast({ - title: res.return_data, + title: res.return_data, duration: 2000 }) } else { @@ -90,11 +90,11 @@ align-items: center; &.on { - color: #f06c7a; - border-bottom: solid 4upx #f06c7a; + color: #0083f5; + border-bottom: solid 4upx #0083f5; } } } } - + diff --git a/pages/user/coupon/coupon.vue b/pages/user/coupon/coupon.vue index 05168bc..da2dcb7 100644 --- a/pages/user/coupon/coupon.vue +++ b/pages/user/coupon/coupon.vue @@ -350,12 +350,12 @@ } .on { - color: #f06c7a; + color: #0083f5; } .border { height: 4upx; - background-color: #f06c7a; + background-color: #0083f5; transition: all .3s ease-out; &.invalid { @@ -620,4 +620,4 @@ * */ } } - + diff --git a/pages/user/deposit/deposit.vue b/pages/user/deposit/deposit.vue index 3fb6080..ed7bf51 100644 --- a/pages/user/deposit/deposit.vue +++ b/pages/user/deposit/deposit.vue @@ -44,7 +44,7 @@ 支付宝支付 - + --> @@ -55,7 +55,7 @@ 微信支付 - + @@ -285,7 +285,7 @@ color: 333; &.on { - background-color: #f06c7a; + background-color: #0083f5; color: #fff; } } @@ -313,7 +313,7 @@ margin: 0 20upx; height: 60upx; font-size: 30upx; - color: #f06c7a; + color: #0083f5; justify-content: flex-end; align-items: center; } @@ -374,7 +374,7 @@ justify-content: center; align-items: center; color: #fff; - background-color: #f06c7a; + background-color: #0083f5; box-shadow: 0upx 5upx 10upx rgba(0, 0, 0, 0.2); } @@ -392,4 +392,4 @@ } } } - + diff --git a/pages/user/keep/keep.vue b/pages/user/keep/keep.vue index 24e6382..b4dfe47 100644 --- a/pages/user/keep/keep.vue +++ b/pages/user/keep/keep.vue @@ -228,11 +228,11 @@ color: #999; } .on{ - color: #f06c7a; + color: #0083f5; } .border{ height: 4upx; - background-color: #f06c7a; + background-color: #0083f5; transition: all .3s ease-out; &.shop{ transform: translate3d(100%,0,0); @@ -383,7 +383,7 @@ } .price{ font-size: 30upx; - color: #f06c7a; + color: #0083f5; } } } @@ -393,4 +393,4 @@ } } - + diff --git a/pages/user/mineCoupons/mineCoupons.vue b/pages/user/mineCoupons/mineCoupons.vue index 1b01ae8..e5ac56c 100644 --- a/pages/user/mineCoupons/mineCoupons.vue +++ b/pages/user/mineCoupons/mineCoupons.vue @@ -167,8 +167,8 @@ align-items: center; &.on { - color: #f06c7a; - border-bottom: solid 4upx #f06c7a; + color: #0083f5; + border-bottom: solid 4upx #0083f5; } } } @@ -225,4 +225,4 @@ } } } - + diff --git a/pages/user/minePromotion/minePromotion.vue b/pages/user/minePromotion/minePromotion.vue index fffd761..6032918 100644 --- a/pages/user/minePromotion/minePromotion.vue +++ b/pages/user/minePromotion/minePromotion.vue @@ -160,7 +160,7 @@ width: 15px; height: 2px; margin-top: 8px; - background-color: #f06c7a; + background-color: #0083f5; transform: rotate(100deg); } @@ -173,7 +173,7 @@ width: 10px; margin-top: 8px; height: 2px; - background-color: #f06c7a; + background-color: #0083f5; transform: rotate(100deg); } diff --git a/pages/user/myQR/myQR.vue b/pages/user/myQR/myQR.vue index ff26849..61c2aa0 100644 --- a/pages/user/myQR/myQR.vue +++ b/pages/user/myQR/myQR.vue @@ -1,19 +1,19 @@ @@ -21,110 +21,110 @@ diff --git a/pages/user/order_details/order_details.vue b/pages/user/order_details/order_details.vue index 82b21a0..2f4eb67 100644 --- a/pages/user/order_details/order_details.vue +++ b/pages/user/order_details/order_details.vue @@ -5,6 +5,8 @@ 已完成 已退款 已取消 + 退款中 + 退款失败 @@ -12,7 +14,7 @@ - + @@ -41,6 +43,14 @@ {{recinfo.orderNo}} + + + 加油单号 : + + + {{recinfo.highChildOrderList[0].gasOrderNo}} + + 支付流水号 : @@ -106,7 +116,7 @@ - 优惠券抵扣 : + 优惠金额 : ¥{{recinfo.deductionPrice}} @@ -141,6 +151,14 @@ {{recinfo.cancelTime | formatDate('-')}} + + + 退款失败原因 : + + + {{recinfo.refusalRefundContent}} + + 完成时间 : @@ -527,7 +545,7 @@ height: 40upx; .price { - color: #f06c7a; + color: #0083f5; } .number { @@ -612,7 +630,7 @@ height: 60upx; width: 20%; margin-left: 10px; - background-color: #f06c7a; + background-color: #0083f5; color: #fff; display: flex; justify-content: center; @@ -642,8 +660,8 @@ .content { font-size: 26upx; - color: #f06c7a; + color: #0083f5; } } } - + diff --git a/pages/user/order_list/order_list.vue b/pages/user/order_list/order_list.vue index a3be7a2..20faa51 100644 --- a/pages/user/order_list/order_list.vue +++ b/pages/user/order_list/order_list.vue @@ -29,24 +29,30 @@ 规格 : {{row.highChildOrderList[0].goodsSpecName}} - ¥{{row.highChildOrderList[0].totalPrice}} - - {{row.highChildOrderList[0].totalPrice*100}} + + ¥{{row.highChildOrderList[0].totalPrice}} + + + {{row.highChildOrderList[0].totalPrice*100}} + 卡券订单 - 金币订单 + 加油缴费 + 金币订单 共{{row.highChildOrderList[0].saleCount}}件商品 合计: - ¥{{row.payPrice}} - - {{row.payPrice*100}} + ¥{{row.payPrice}} + + + {{row.payPrice*100}} + @@ -96,10 +102,13 @@ 1: '等待付款', 2: '订单已支付', 3: '订单已完成', - 5: '订单已取消' + 4: '订单已退款', + 5: '订单已取消', + 6: '订单退款中', + 7: '订单退款失败' }, // 退换货 - orderType: ['全部', '待支付', '已支付', '已完成', '已取消'], + orderType: ['全部', '待支付', '已支付', '已完成', '已退款', '已取消'], //订单列表 演示数据 orderList: [], list: [], @@ -110,17 +119,17 @@ loadingText: '', typeId: '', imageUrl: app.globalData.imgUrl, - reFresh : "" + reFresh: "" } }, onLoad(option) { // #ifdef H5 - this.headerTop = '44px'; - // #endif + this.headerTop = '44px'; + // #endif let tbIndex = parseInt(option.tbIndex) + 1; this.list = this.orderList[tbIndex]; - this.tabbarIndex = tbIndex; + this.tabbarIndex = tbIndex; this.typeId = tbIndex; this.getUserOrderList(); }, @@ -132,16 +141,16 @@ onReachBottom() { this.getUserOrderList(); }, - watch:{ - //监听reFresh,如果有修改就执行监听器 - reFresh:function(){ + watch: { + //监听reFresh,如果有修改就执行监听器 + reFresh: function() { this.tabbarIndex = 0; this.typeId = ''; this.pageNum = 1; this.orderList = [] this.isNoMoreData = false; this.getUserOrderList(); - } + } }, methods: { //查询订单列表 @@ -154,8 +163,8 @@ return false; } let statusId; - if (this.typeId == 4) { - statusId = 5; + if (this.typeId == 2) { + statusId = '2,6,7'; } else { statusId = this.typeId; } @@ -171,7 +180,7 @@ if (res.return_code == '000000' && res.return_data.list != '') { uni.hideLoading(); this.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true; - if(res.return_data.total == (this.pageNum * this.pageSize)){ + if (res.return_data.total == (this.pageNum * this.pageSize)) { this.isNoMoreData = true; } this.orderList = this.orderList.concat(res.return_data.list); @@ -277,7 +286,8 @@ } uni.redirectTo({ url: "/pages/pay/payment/payment?amount=" + row.payPrice + - '&paytype=' + payTypes + '&orderId=' + row.id+'&couponId='+this.orderList[0].highChildOrderList[0].goodsId + '&paytype=' + payTypes + '&orderId=' + row.id + '&couponId=' + this.orderList[0] + .highChildOrderList[0].goodsId }) } } @@ -291,7 +301,7 @@ .zspec { font-size: 22rpx; - background-color: #f06c7a; + background-color: #0083f5; color: #FFFFFF; height: 40rpx; display: -webkit-box; @@ -343,8 +353,8 @@ align-items: center; &.on { - color: #f06c7a; - border-bottom: solid 4upx #f06c7a; + color: #0083f5; + border-bottom: solid 4upx #0083f5; } } diff --git a/pages/user/positioning/positioning.vue b/pages/user/positioning/positioning.vue index aed2f80..bdb2b91 100644 --- a/pages/user/positioning/positioning.vue +++ b/pages/user/positioning/positioning.vue @@ -1,44 +1,60 @@