pull/1/head
caolc 2 years ago
parent 340cbc59e4
commit 8fd25deedf
  1. 4
      BagStation/orderInvoicing/orderInvoicing.vue
  2. 12
      BagStation/pages/components/price-select-tab.vue
  3. 3
      BagStation/pages/makeOrder/makeOrder.vue
  4. 20
      BagStation/pages/makeOrder/orderPaying.vue
  5. 3
      BagStation/pages/stationDetail/stationDetail.vue
  6. 2
      api/oil-order.js
  7. 8
      api/oil-site.js
  8. 10
      components/three-sites.vue
  9. 149
      pages/index/startPage/startPage.vue
  10. 6
      pages/tabbar/home/home.vue
  11. 225
      pages/tabbar/order/orderList/orderList.vue
  12. 24
      pages/tabbar/station/stationList.vue
  13. 2
      utils/request.js

@ -113,7 +113,9 @@
invoicBankNumber: '', //
remark: '', //
invoicEmail: '', //,
orderSerialNumber: '' //
orderSerialNumber: '' ,//,
"clientBelong":"ZHONGPIN",
}
}
},

@ -587,7 +587,8 @@
payType : 'CUSTOMER_ACTIVE',
userType:'0',
xoilAmountGun:e ,
priceId:this.activeSitePrice
priceId:this.activeSitePrice,
clientBelong: "ZHONGPIN"
}
this.xoilAmountGun = e
oilSiteApi.getOrderDiscountInfo(number).then( res=>{
@ -635,7 +636,8 @@
payType : 'CUSTOMER_ACTIVE',
userType:'0',
xoilAmountGun:e.detail.value,
priceId:this.activeSitePrice
priceId:this.activeSitePrice,
clientBelong: "ZHONGPIN"
}
this.xoilAmountGun = e.detail.value
oilSiteApi.getOrderDiscountInfo(number).then( res=>{
@ -896,6 +898,7 @@
'version':1,
'xoilAmountGun':this.vol
}
console.log(orderData,'orderDataorderDataorderDataorderDataorderDataorderDataorderDataorderData');
oilOrderApi.createOrder(orderData).then(res => {
if (res.code == 20000) {
clearTimeout(this.timer)
@ -919,7 +922,10 @@
//
getNewSitePrice(channelId) {
this.oilSitePriceDetailsVo = []
oilSiteApi.getNewSitePrice(channelId).then(res => {
oilSiteApi.getNewSitePriceZp({
channelId:channelId,
clientBelong: "ZHONGPIN"
}).then(res => {
if (res.code == 20000) {
this.plateNumbers = res.data.plateNumbers
this.oilSitePriceDetailsVo = res.data.oilSitePriceDetailsVo;

@ -112,7 +112,8 @@
getSiteInfo(id) {
let data2 = {
...uni.getStorageSync('location'),
siteId: id
siteId: id,
clientBelong: "ZHONGPIN"
}
oilSiteApi.getSiteDetails(data2).then(res => {
if (res.code == 20000) {

@ -318,7 +318,7 @@
userIp: (this.userIp?this.userIp:"36.57.160.59") ,
merchantNo:'10089027856'
}
console.log(payData,'payDatapayData')
oilPayApi.aggregatePay(payData).then(res => {
if (res.code == 20000) {
uni.requestPayment({
@ -327,10 +327,6 @@
success: (res1) => {
console.log(res)
if (res.code == 20000) {
// this.getPayStatus(this.outTradeNo)
// this.getLastMoney()
// this.getCards()
// console.log('success:' + JSON.stringify(res));
uni.showToast({
title: res.msg
})
@ -351,23 +347,9 @@
}
},
fail: function(err) {
console.log(res, err, '************')
// console.log('fail:' + JSON.stringify(err));
}
})
// uni.showToast({
// title: res.msg
// })
// uni.redirectTo({
// url: '/BagStation/pages/makeOrder/payResult?status=success',
// fail: (err) => {
// console.log(err)
// }
// })
} else {
// uni.redirectTo({
// url: '/BagStation/pages/makeOrder/payResult?status=fail'
// })
}
})

@ -252,7 +252,8 @@
console.log('进入获取油站信息')
let data2 = {
...uni.getStorageSync('location'),
siteId: id
siteId: id,
clientBelong: "ZHONGPIN"
}
oilSiteApi.getSiteDetails(data2).then(res => {
console.log('进入获取油站信息getSiteDetails',res)

@ -4,6 +4,8 @@ const group_name = "oilSiteOrderInfo"
export default {
// 下单
createOrder(data) {
// data = Object.assign(data,{'clientBelong':'ZHONGPIN',});
console.log(data,'datadatadata')
return request({
url: `/${service_name}/${group_name}/createOrder`,
method: 'post',

@ -82,6 +82,14 @@ export default {
method: 'get'
})
},
// 中品 下单 -- 获取最新油站价格、司机、加油员相关信息
getNewSitePriceZp(data) {
return request({
url: `/${service_name}/${group_name}/getSitePriceByBelong `,
method: 'post',
data:data
})
},
//根据地址获取详细地址信息
getGeoByAddress(address) {
return request({

@ -73,18 +73,22 @@
currentPage: 1,
pageSize: 3,
params: { //Object //
clientBelong:'ZHONGPIN',
sort: "juli", //String // ( price juli )
...uni.getStorageSync('location'),
...this.filterData
...this.filterData,
comprehensiveSort:1,
// siteBrand: "", // // ( 1- 2- 3- 4- 5- 6- 7- 8- )
// channelCode: "", // // ( OIL WJY LV TY YDJY)
// oilProductCode: "" // // ( 0# 92# 92#)
}
}
oilSiteApi.getSiteList(data1).then(res => {
oilSiteApi.getSiteLists(data1).then(res => {
if (res.code == 20000) {
this.siteList = res.data.list
this.siteList = res.data.list;
(this.siteList.length>3)&&(this.siteList.length = 3)
}
})
},

@ -44,81 +44,14 @@
}
},
onLoad(option) {
const token = uni.getStorageSync('Authorization')
const openid = uni.getStorageSync('openid')
let key = ''
if (token && openid) {
key = '在线'
} else {
key = '离线'
}
if (key == '在线') {
// if (!uni.getStorageSync('filterData')) {
// this.getFilterData()
// } else if (uni.getStorageSync('filterData')[0].detailList.length < 2) {
// this.getFilterData()
// }
}
// 广
let interstitialAd = null
// onLoad广
if (wx.createInterstitialAd) {
interstitialAd = wx.createInterstitialAd({
adUnitId: 'adunit-a7faf57adeed211f'
})
}
interstitialAd.onLoad((err) => {
console.log('onLoad event emit', err)
})
interstitialAd.onError((err) => {
setTimeout(() => {
if (key == '在线') {
uni.switchTab({
url: '/pages/tabbar/home/home',
fail: (err) => {
console.log(err)
}
// url:'/BagStation/orderDetail/orderDetail'
})
} else {
uni.redirectTo({
url: '/BagAuth/pages/login/login'
})
}
}, 2000)
console.log('onError event emit', err)
})
// 广
if (interstitialAd) {
interstitialAd.show().catch((err) => {
console.error(err)
})
}
interstitialAd.onClose(res => {
setTimeout(() => {
if (key == '在线') {
uni.switchTab({
url: '/pages/tabbar/home/home',
fail: (err) => {
console.log(err)
}
// url:'/BagStation/orderDetail/orderDetail'
})
} else {
uni.redirectTo({
url: '/BagAuth/pages/login/login'
})
}
}, 2000)
})
},
onReady(option) {
let taht = this
const updateManager = uni.getUpdateManager();
updateManager.onCheckForUpdate(function(res) {
//
console.log('请求完新版本信息的回调', res.hasUpdate);
if (!res.hasUpdate) {
taht.initFn(option)
}
});
updateManager.onUpdateReady(function(res) {
@ -127,20 +60,86 @@
content: '新版本已经准备好,是否重启应用?',
success(res) {
if (res.confirm) {
console.log(res.confirm, 'res.confirm版本信息')
// applyUpdate
updateManager.applyUpdate();
} else {
taht.initFn(option)
}
}
},
});
});
updateManager.onUpdateFailed(function(res) {
console.log('新的版本下载失败')
//
});
},
onReady(option) {},
methods: {
initFn(option) {
const token = uni.getStorageSync('Authorization')
const openid = uni.getStorageSync('openid')
let key = ''
if (token && openid) {
key = '在线'
} else {
key = '离线'
}
// 广
let interstitialAd = null
// onLoad广
if (wx.createInterstitialAd) {
interstitialAd = wx.createInterstitialAd({
adUnitId: 'adunit-a7faf57adeed211f'
})
}
interstitialAd.onLoad((err) => {
console.log('onLoad event emit', err)
})
interstitialAd.onError((err) => {
setTimeout(() => {
if (key == '在线') {
uni.switchTab({
url: '/pages/tabbar/home/home',
fail: (err) => {
console.log(err)
}
// url:'/BagStation/orderDetail/orderDetail'
})
} else {
uni.redirectTo({
url: '/BagAuth/pages/login/login'
})
}
}, 2000)
console.log('onError event emit', err)
})
// 广
if (interstitialAd) {
interstitialAd.show().catch((err) => {
console.error(err)
})
}
interstitialAd.onClose(res => {
setTimeout(() => {
if (key == '在线') {
uni.switchTab({
url: '/pages/tabbar/home/home',
fail: (err) => {
console.log(err)
}
// url:'/BagStation/orderDetail/orderDetail'
})
} else {
uni.redirectTo({
url: '/BagAuth/pages/login/login'
})
}
}, 2000)
})
},
getFilterData() {
console.log('在线')
oilSiteApi.getCheckInfo().then(res => {
@ -172,7 +171,7 @@
this.menuList[1].detailList = this.menuList[1].detailList.concat(productCodes)
this.menuList[2].detailList = this.menuList[2].detailList.concat(siteBrands)
uni.setStorageSync('filterData', this.menuList);
console.log('存入',this.menuList)
console.log('存入', this.menuList)
// this.$refs.slFilter.resetMenuList(this.menuList)
}
})

@ -109,15 +109,15 @@
<!-- 广告图片开始 -->
<view class="my-bg padding">
<view class="" >
<swiper autoplay interval='5000' style="width: 100%;height: 204rpx;" class="swiper" circular >
<!-- <swiper autoplay interval='5000' style="width: 100%;height: 204rpx;" class="swiper" circular >
<swiper-item @click="swiperClick(item,index)" v-for="(item,index) in swiperArray">
<image :src="item.src" style="width: 100%;" mode="widthFix"></image>
</swiper-item>
<swiper-item>
<ad unit-id="adunit-fae65289bc72095d" ad-intervals="30"></ad>
</swiper-item>
</swiper>
<!-- <image :src="starUrl+'banner.png'" style="width: 100%;" mode="widthFix"></image> -->
</swiper> -->
<image :src="starUrl+'banner.png'" style="width: 100%;" mode="widthFix"></image>
</view>
</view>
<!-- 筛选开始 -->

@ -98,6 +98,7 @@
data() {
return {
getSiteListTimer:null,
TabCur: 0,
search: '',
status: {
@ -214,118 +215,126 @@
}
},
onRequest() {
if (this.TabCur == 0) {
this.currentPage.currentPage = 1
this.list = []
this.getOrder('全部', this.currentPage.currentPage,'onRequest')
} else if (this.TabCur == 1) {
this.currentPage.currentPage0 = 1
this.list0 = []
this.getOrder('0', this.currentPage.currentPage0,'onRequest')
} else if (this.TabCur == 2) {
this.currentPage.currentPage1 = 1
this.list1 = []
this.getOrder('1', this.currentPage.currentPage1,'onRequest')
} else if (this.TabCur == 3) {
this.currentPage.currentPage2 = 1
this.list2 = []
this.getOrder('2', this.currentPage.currentPage2,'onRequest')
} else if (this.TabCur == 4) {
this.currentPage.currentPage3 = 1
this.list3 = []
this.getOrder('3', this.currentPage.currentPage3,'onRequest')
}
if (this.TabCur == 0) {
this.currentPage.currentPage = 1
this.list = []
this.getOrder('全部', this.currentPage.currentPage,'onRequest')
} else if (this.TabCur == 1) {
this.currentPage.currentPage0 = 1
this.list0 = []
this.getOrder('0', this.currentPage.currentPage0,'onRequest')
} else if (this.TabCur == 2) {
this.currentPage.currentPage1 = 1
this.list1 = []
this.getOrder('1', this.currentPage.currentPage1,'onRequest')
} else if (this.TabCur == 3) {
this.currentPage.currentPage2 = 1
this.list2 = []
this.getOrder('2', this.currentPage.currentPage2,'onRequest')
} else if (this.TabCur == 4) {
this.currentPage.currentPage3 = 1
this.list3 = []
this.getOrder('3', this.currentPage.currentPage3,'onRequest')
}
},
getOrder(id, page, tip) {
let postData = {
currentPage: page, //Number
pageSize: 10, //Number
index: (page - 1) * 10,
params: { //Object
clientBelong:'ZHONGPIN',
orderStatus: id == '全部' ? '' : (id +''), //String 0 1 -1 23退
search: this.search //类型:String 必有字段 备注:搜索 ( 油站名称/ 订单编号/ 油品)
},
}
console.log('tip',id,tip)
orderApi.getOrderInfoByPage(postData).then(res => {
if (res.code == 20000) {
// console.log('', page, res.data.list.length)
// 0 1 -1 23退
if (id == '0') {
// 0 list0
this.list0 = this.list0.concat(res.data.list)
if (res.data.list.length < 10) { //
this.status.loadOrderStatus0 = 'nomore'
uni.showToast({
title: '就这么多啦',
icon: 'none'
})
} else {
this.currentPage.currentPage0++
this.status.loadOrderStatus0 = 'load'
}
} else if (id == '1') {
// 1 list1
this.list1 = this.list1.concat(res.data.list)
if (res.data.list.length < 10) { //
this.status.loadOrderStatus1 = 'nomore'
uni.showToast({
title: '就这么多啦',
icon: 'none'
})
} else {
this.currentPage.currentPage1++
this.status.loadOrderStatus1 = 'load'
this.$emit('changeOrderLoadStatus', id, 'load', false)
}
} else if (id == '2') {
//2 list2
this.list2 = this.list2.concat(res.data.list)
if (res.data.list.length < 10) { //
this.status.loadOrderStatus2 = 'nomore'
uni.showToast({
title: '就这么多啦',
icon: 'none'
})
} else {
this.currentPage.currentPage2++
this.status.loadOrderStatus2 = 'load'
this.$emit('changeOrderLoadStatus', id, 'load', false)
}
} else if (id == '3') {
// 3退 list3
this.list3 = this.list3.concat(res.data.list)
if (res.data.list.length < 10) { //
this.status.loadOrderStatus3 = 'nomore'
uni.showToast({
title: '就这么多啦',
icon: 'none'
})
} else {
this.currentPage.currentPage3++
this.status.loadOrderStatus3 = 'load'
}
} else if (id == '全部') {
// list
this.list = this.list.concat(res.data.list)
if (res.data.list.length < 10) { //
this.status.loadOrderStatus = 'nomore'
uni.showToast({
title: '就这么多啦',
icon: 'none'
})
} else {
this.currentPage.currentPage++
this.status.loadOrderStatus = 'load'
clearTimeout(this.getSiteListTimer);
this.getSiteListTimer = setTimeout(()=>{
let postData = {
currentPage: page, //Number
pageSize: 10, //Number
index: (page - 1) * 10,
params: { //Object
clientBelong:'ZHONGPIN',
orderStatus: id == '全部' ? '' : (id +''), //String 0 1 -1 23退
search: this.search //类型:String 必有字段 备注:搜索 ( 油站名称/ 订单编号/ 油品)
},
}
console.log('tip',id,tip)
orderApi.getOrderInfoByPage(postData).then(res => {
if (res.code == 20000) {
// console.log('', page, res.data.list.length)
// 0 1 -1 23退
if (id == '0') {
// 0 list0
this.list0 = this.list0.concat(res.data.list)
if (res.data.list.length < 10) { //
this.status.loadOrderStatus0 = 'nomore'
uni.showToast({
title: '就这么多啦',
icon: 'none'
})
} else {
this.currentPage.currentPage0++
this.status.loadOrderStatus0 = 'load'
}
} else if (id == '1') {
// 1 list1
this.list1 = this.list1.concat(res.data.list)
if (res.data.list.length < 10) { //
this.status.loadOrderStatus1 = 'nomore'
uni.showToast({
title: '就这么多啦',
icon: 'none'
})
} else {
this.currentPage.currentPage1++
this.status.loadOrderStatus1 = 'load'
this.$emit('changeOrderLoadStatus', id, 'load', false)
}
} else if (id == '2') {
//2 list2
this.list2 = this.list2.concat(res.data.list)
if (res.data.list.length < 10) { //
this.status.loadOrderStatus2 = 'nomore'
uni.showToast({
title: '就这么多啦',
icon: 'none'
})
} else {
this.currentPage.currentPage2++
this.status.loadOrderStatus2 = 'load'
this.$emit('changeOrderLoadStatus', id, 'load', false)
}
} else if (id == '3') {
// 3退 list3
this.list3 = this.list3.concat(res.data.list)
if (res.data.list.length < 10) { //
this.status.loadOrderStatus3 = 'nomore'
uni.showToast({
title: '就这么多啦',
icon: 'none'
})
} else {
this.currentPage.currentPage3++
this.status.loadOrderStatus3 = 'load'
}
} else if (id == '全部') {
// list
this.list = this.list.concat(res.data.list)
if (res.data.list.length < 10) { //
this.status.loadOrderStatus = 'nomore'
uni.showToast({
title: '就这么多啦',
icon: 'none'
})
} else {
this.currentPage.currentPage++
this.status.loadOrderStatus = 'load'
}
}
}
}
})
})
},500)
}
}
}

@ -69,6 +69,7 @@
data() {
return {
getSiteListTimer:null,
filterData: {
// oilProductCode: '0#'
},
@ -374,7 +375,6 @@
getSiteList() {
this.refreshLocation()
let data1 = {
currentPage: this.currentPage,
pageSize: 10,
@ -482,16 +482,28 @@
},
onInput() {
setTimeout(() => {
// setTimeout(() => {
// this.currentPage = 1
// this.siteList = []
// this.getSiteList()
// }, 100)
clearTimeout(this.getSiteListTimer);
this.getSiteListTimer = setTimeout(()=>{
this.currentPage = 1
this.siteList = []
this.getSiteList()
}, 100)
},500);
},
onSearch() {
this.currentPage = 1
this.siteList = []
this.getSiteList()
// this.currentPage = 1
// this.siteList = []
// this.getSiteList()
clearTimeout(this.getSiteListTimer);
this.getSiteListTimer = setTimeout(()=>{
this.currentPage = 1
this.siteList = []
this.getSiteList()
},500);
}
}
}

@ -4,7 +4,7 @@ import utils from '@/utils/encode'
// const env = process.env.NODE_ENV
const env = 'production'/* */
// const env = 'test'
const testUrl = 'http://192.168.110.99:38080'
const testUrl = 'http://192.168.0.23:38080'
// const productUrl = 'http://121.196.213.68/adminapi' //预生产
// const productUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new

Loading…
Cancel
Save