1.对接团油接口

yj-dev
杨杰 3 years ago
parent 682dac1689
commit b4b58e69b1
  1. 8
      Utils/Api.js
  2. 39
      pages.json
  3. 6
      pages/goods/refuel-details/refuel-details.vue
  4. 89
      pages/goods/refuel/refuel.vue
  5. 34
      pages/tabBar/home/home.vue

@ -131,6 +131,14 @@ export const getUserNormalDiscountList = params => {
export const getStoreList = params => {
return POST('GET', `${base}/highMerchantStore/getStoreList`, params).then(res => res.data);
}
//查询团油列表
export const getGasStoreList = params => {
return POST('GET', `${base}/highGas/getGasStoreList`, params).then(res => res.data);
}
//查询团油详情
export const getGasDetailByStoreKey = params => {
return POST('GET', `${base}/highGas/getGasDetailByStoreKey`, params).then(res => res.data);
}
/**
* H5 获取用户信息

@ -1,9 +1,26 @@
{
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/tabBar/home/home",
"style": {
"navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white",
"onReachBottomDistance": 50,
"app-plus": {
"titleNView": false, //
"softinputNavBar": "none",
"subNVues": [{
"id": "homeTitleNvue", //
"path": "pages/tabBar/home/subNvue/homeTitleNvue", //
"type": "navigationBar"
}]
}
}
}, {
"path": "pages/goods/refuel-succes/refuel-succes",
"style" :
{
"style": {
//
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#0083f5",
@ -22,24 +39,6 @@
"enablePullDownRefresh": false
}
}, {
"path": "pages/tabBar/home/home",
"style": {
"navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white",
"onReachBottomDistance": 50,
"app-plus": {
"titleNView": false, //
"softinputNavBar": "none",
"subNVues": [{
"id": "homeTitleNvue", //
"path": "pages/tabBar/home/subNvue/homeTitleNvue", //
"type": "navigationBar"
}]
}
}
}, {
"path": "pages/user/order_details/order_details",
"style": {

@ -23,15 +23,15 @@
92# <image mode="widthFix" src="../../../static/img/xiala.png"></image>
</view>
<view class="margle20 font15 fcoreb5 flleft mart20 borRit">
<view class="fontspec fotct paddleft10">团购价</view>
<view class="fontspec fotct ">团购价</view>
<view class="fontwig6 font20"><text class="font14"></text>6.38</view>
</view>
<view class="margle20 font15 fcor666 flleft mart20 borRit">
<view class="fontspec fotct paddleft10">油站价</view>
<view class="fontspec fotct ">油站价</view>
<view class="fontwig6 font20"><text class="font14"></text>6.88</view>
</view>
<view class="margle20 font15 fcor666 flleft mart20 ">
<view class="fontspec fotct paddleft10">国标价</view>
<view class="fontspec fotct ">国标价</view>
<view class="fontwig6 font20"><text class="font14"></text>6.88</view>
</view>
</view>

@ -6,52 +6,14 @@
</view>
<slFilter :independence="true" :color="titleColor" :themeColor="themeColor" :menuList.sync="menuList"
@result="result"></slFilter>
<view class="width90 height100p backcorfff border-r mart10" @click="goDetails">
<image mode="widthFix" src="../../../static/img/noorder.png" class="recontleft flleft mart10 border-r">
<view class="width90 height100p backcorfff border-r mart10" v-for="(item,index) in refuelList" :key="index" @click="goDetails">
<image mode="widthFix" :src="item.store_logo" class="recontleft flleft mart10 border-r">
</image>
<view class="recontright">
<view class="text1 width100 font15 fontwig6 paddtop10">贵州花冠中石油燃气加油站</view>
<view class="text1 width100 font15 fontwig6 paddtop10">{{item.store_name}}</view>
<view class="width100 mart10 height22">
<view class="width70 flleft text1 font13 fcor999">
花冠路贵惠大道桐荫26号
</view>
<view class="width30 flright font13 fcor666 fotct">
<image mode="widthFix" src="../../../static/img/dh.png" style="width: 10px;"></image>1.9km
</view>
</view>
<view class="font14 width100 fcoreb5 mart5 height22">
<text class="font18 fontwig6">6.40</text><text class="fcor999 margle">油站价6.88</text>
</view>
</view>
</view>
<view class="width90 height100p backcorfff border-r mart10">
<image mode="widthFix" src="../../../static/img/noorder.png" class="recontleft flleft mart10 border-r">
</image>
<view class="recontright">
<view class="text1 width100 font15 fontwig6 paddtop10">贵州花冠中石油燃气加油站</view>
<view class="width100 mart10 height22">
<view class="width70 flleft text1 font13 fcor999">
花冠路贵惠大道桐荫26号
</view>
<view class="width30 flright font13 fcor666 fotct">
<image mode="widthFix" src="../../../static/img/dh.png" style="width: 10px;"></image>1.9km
</view>
</view>
<view class="font14 width100 fcoreb5 mart5 height22">
<text class="font18 fontwig6">6.40</text><text class="fcor999 margle">油站价6.88</text>
</view>
</view>
</view>
<view class="width90 height100p backcorfff border-r mart10">
<image mode="widthFix" src="../../../static/img/noorder.png" class="recontleft flleft mart10 border-r">
</image>
<view class="recontright">
<view class="text1 width100 font15 fontwig6 paddtop10">贵州花冠中石油燃气加油站</view>
<view class="width100 mart10 height22">
<view class="width70 flleft text1 font13 fcor999">
花冠路贵惠大道桐荫26号
{{item.address}}
</view>
<view class="width30 flright font13 fcor666 fotct">
<image mode="widthFix" src="../../../static/img/dh.png" style="width: 10px;"></image>1.9km
@ -67,6 +29,7 @@
</template>
<script>
import {getGasStoreList} from '../../../Utils/Api.js';
import slFilter from '@/components/sl-filter/sl-filter.vue';
import uSearchBar from '../../../components/uni-search-bar/components/uni-search-bar/uni-search-bar.vue';
export default {
@ -173,13 +136,51 @@
}
]
}
]
],
refuelList: [],
pageNum: 1,
pageSize: 10,
isNoMoreData: false,
}
},
onLoad() {
this.getGasStoreList();
},
methods: {
//
getGasStoreList() {
uni.showLoading({
title: '加载中...'
})
if (this.isNoMoreData) {
uni.hideLoading()
return false;
}
let pagenum = this.pageNum;
let params = {
distance: '25',
regionId: '110000',
oilNoName: '92#',
longitude: "116.881602",
latitude: '39.912496',
pageNum: pagenum,
pageSize: this.pageSize
}
getGasStoreList(params).then(res => {
if (res.return_code == '000000') {
uni.hideLoading();
this.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true;
if (res.return_data.total == (this.pageNum * this.pageSize)) {
this.isNoMoreData = true;
}
this.refuelList = this.refuelList.concat(res.return_data.list);
this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum;
} else {
this.refuelList = [];
uni.hideLoading()
}
})
},
//
goDetails() {
uni.navigateTo({

@ -211,8 +211,9 @@
//
categoryList: [{
id: 1,
name: '办公',
img: '/static/img/wxpay.png'
name: '团油',
img: '/static/img/wxpay.png',
src: '/pages/goods/refuel/refuel'
},
{
id: 2,
@ -228,26 +229,6 @@
id: 4,
name: '日用',
img: '/static/img/wxpay.png'
},
{
id: 5,
name: '蔬果',
img: '/static/img/wxpay.png'
},
{
id: 6,
name: '运动',
img: '/static/img/wxpay.png'
},
{
id: 7,
name: '书籍',
img: '/static/img/wxpay.png'
},
{
id: 8,
name: '文具',
img: '/static/img/wxpay.png'
}
],
//
@ -507,6 +488,13 @@
},
eheckStu(item) {
this.cpStuats = item;
},
//
toCategory(item) {
uni.navigateTo({
url: item.src
})
}
}
};
@ -818,7 +806,7 @@
flex-wrap: wrap;
.category {
width: 20%;
width: 25%;
margin-top: 50upx;
display: flex;
flex-wrap: wrap;

Loading…
Cancel
Save