diff --git a/api/cloud-site.js b/api/cloud-site.js
index a997e7e..9b5fca1 100644
--- a/api/cloud-site.js
+++ b/api/cloud-site.js
@@ -21,11 +21,17 @@ export default {
// 小程序加油订单列表
getNewItemSiteOrder(data) {
return request({
- url: `/${service_name}/${group_name}/getNewItemSiteOrder`,
+ url: `/xkhl-site/cloudApi/getOrderInfoCloudList`,
method: 'post',
data: data
})
},
+ logout(data) {
+ return request({
+ url: `/xkhl-identity/unionAuth/logout`,
+ method: 'GET',
+ })
+ },
// 换手机号提交
updatePhone(data) {
return request({
diff --git a/api/oil-finance.js b/api/oil-finance.js
index b41afc0..6d71fa1 100644
--- a/api/oil-finance.js
+++ b/api/oil-finance.js
@@ -10,7 +10,7 @@ export default {
},
getOrderInfo(data) {
return request({
- url: `/${service_name}/${group_name}/getNewOrderInfo`,
+ url: `/xkhl-site/cloudApi/getNewOrderInfo`,
method: 'post',
data: data
})
diff --git a/api/oil-identity.js b/api/oil-identity.js
index 79a655b..b31b2ab 100644
--- a/api/oil-identity.js
+++ b/api/oil-identity.js
@@ -15,7 +15,7 @@ export default{
// 获取用户信息
sendCode(code){
return request({
- url: `/${service_name}/${group_name}/sendCode`,
+ url: `/xkhl-identity/unionAuth/sendCode`,
method: 'post',
data:{
code:code,
@@ -43,7 +43,7 @@ export default{
//切换油站
changeChannelLogin(data){
return request({
- url: `/${service_name}/${group_name}/changeChannelLogin`,
+ url: `/xkhl-identity/unionAuth/changeSiteLogin`,
method: 'post',
data:data,
@@ -52,7 +52,7 @@ export default{
//微信一键登录 new
loginPersonal(data){
return request({
- url: `/${service_name}/${WchatLogin_name}/loginPersonal`,
+ url: `/xkhl-identity/unionAuth/loginPersonal`,
method: 'post',
data:data,
@@ -61,7 +61,7 @@ export default{
//首次登录绑定手机号 绑定微信手机号 new
bindLoginByPhonePersonal(data){
return request({
- url: `/${service_name}/${WchatLogin_name}/bindLoginByPhonePersonal`,
+ url: `/xkhl-identity/unionAuth/bindLoginByPhonePersonal`,
method: 'post',
data:data,
diff --git a/api/oli-site.js b/api/oli-site.js
index 5750ba9..c1b78ac 100644
--- a/api/oli-site.js
+++ b/api/oli-site.js
@@ -71,7 +71,7 @@ export default{
// 获取订单列表
getNewItemSiteOrder(data) {
return request({
- url: `/${service_name}/${group_name}/getNewItemSiteOrder`,
+ url: `/xkhl-site/cloudApi/getOrderInfoCloudList`,
method: 'post',
data: data
})
@@ -79,13 +79,13 @@ export default{
// 获取用户基础信息
getSiteBasicData(id) {
return request({
- url: `/${service_name}/${info_name}/getSiteBasicData/`+id,
+ url: `/xkhl-site/cloudApi/getSiteBasicData`,
method: 'get'
})
},// 获取油站信息
getSiteDetail(id) {
return request({
- url: `/${service_name}/${info_name}/getSiteDetail/`+id,
+ url: `/xkhl-site/cloudApi/getSiteDetail`,
method: 'get'
})
},
diff --git a/api/oli-user.js b/api/oli-user.js
index 944f54d..978dc5b 100644
--- a/api/oli-user.js
+++ b/api/oli-user.js
@@ -6,7 +6,7 @@ export default{
//根据用户手机查询油站
getByPhone(phone){
return request({
- url: `/${service_name}/${group_name}/getByPhone/${phone}`,
+ url: `/xkhl-user/saasCustomerSiteRelation/getByPhone/${phone}`,
method: 'get'
})
},
diff --git a/packageOrders/pages/orderList/orderList.vue b/packageOrders/pages/orderList/orderList.vue
index 3204bdf..c24b2e8 100644
--- a/packageOrders/pages/orderList/orderList.vue
+++ b/packageOrders/pages/orderList/orderList.vue
@@ -20,78 +20,24 @@
- {{item}}
+ {{item.label}}
-
-
+
-
-
+
+
-
+
-
+
+
@@ -109,15 +55,34 @@
UniLoadMore
},
data() {
- return {
-
+ return {
+ orderList:[],
+ getData: {
+ pageSize: 15,
+ currentPage: 1,
+ params: {
+ istate:''
+ }
+ },
startTime:'',
endTime:"",
activeSource: '小程序',
indexSource: 1,
sources: ['网页版', '小程序'],
tabList: [
- '全部','待支付', '已支付 ', '退款'
+ {
+ label:'全部',
+ value:'',
+ },{
+ label:'待支付',
+ value:'0'
+ }, {
+ label:'已支付',
+ value:'1'
+ }, {
+ label:'退款',
+ value:'3'
+ }
],
TabCur: 0,
pageNumber: 1,
@@ -159,18 +124,35 @@
},
created() {
- this.getTime()
- this.loadList(-3, this.pageNumber1, 'created')
- this.loadList(0, this.pageNumber2, 'created')
- this.loadList(1, this.pageNumber3, 'created')
- this.loadList(-2, this.pageNumber4, 'created')
+ // this.getTime()
+ // this.loadList(0, this.pageNumber2, 'created')
+ // this.loadList(1, this.pageNumber3, 'created')
+ // this.loadList(-2, this.pageNumber4, 'created')
},
- onLoad() {
+ onLoad(e) {
+ let {type=null} = e;
+ console.log(type,type=='today','=============')
+ if( type=='today'){
+ console.log(type,'today')
+ this.getTime()
+ }
+ this.loadList()
+ console.log(type,'*******');
uni.setStorageSync('orderType', 1)
},
onReachBottom() { //上拉触底函数
- // console.log('触底函数')
- this.loadMoreOrder('onReachBottom')
+ console.log('触底函数');
+ this.getData.currentPage+=1;
+ this.loadList()
+ // this.loadMoreOrder('onReachBottom')
+ },
+ watch:{
+ // getData:{
+ // handler(){
+ // this.loadList()
+ // },
+ // deep:true
+ // }
},
methods: {
getTime(){
@@ -181,8 +163,8 @@
let hr = nowDate.getHours()
let mf = nowDate.getMinutes() < 10 ? '0' + nowDate.getMinutes() : nowDate.getMinutes()
let ss =nowDate.getSeconds() < 10 ? '0' + nowDate.getSeconds() :nowDate.getSeconds()
- this.startTime = year + "-" + month + "-" + day+" " + '00:00:00';
- this.endTime = year + "-" + month + "-" + day+" " +hr+':'+mf+':'+ss
+ this.getData.params.startTime = year + "-" + month + "-" + day+" " + '00:00:00';
+ this.getData.params.endTime = year + "-" + month + "-" + day+" " +hr+':'+mf+':'+ss
},
loadMoreOrder(from) {
// console.log(from,'loadMoreOrder时间')
@@ -214,10 +196,13 @@
}
},
tabSelect(e) {
- this.TabCur = e.currentTarget.dataset.id;
- this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60
+ this.getData.currentPage = 1
+ this.getData.params.istate = e;
+ this.loadList()
+ // this.TabCur = e.currentTarget.dataset.id;
+ // this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60
// console.log('tabSelect时间')
- this.loadMoreOrder('tabSelect')
+ // this.loadMoreOrder('tabSelect')
},
pickSource(e) {
console.log(e)
@@ -264,167 +249,173 @@
break
}
},
- loadList(istate, pageNumber, from) {
- // console.log(istate)
- // console.log(pageNumber)
- // console.log(from)
- console.log( this.startTime)
- console.log( this.endTime)
- let that = this
- const data2 = {
- istate: istate, //类型:Number 必有字段 备注:订单状态 0待支付 1支付成功 查所有传 ''
- pageIndex: pageNumber ,//类型:Number 必有字段 备注:查询第几页,默认一页10条
- // startTime: that.startTime,
- // endTime: that.endTime
- }
- console.log('这里是this.indexSource',this.indexSource)
- if (this.indexSource == 0) {
- // 网页版
- if (data2.istate == -3) {
- data2.istate = ''
- } else if (data2.istate == -2) {
- data2.istate = 3
+ loadList() {
+ oliSiteApi.getNewItemSiteOrder(this.getData ).then(res=>{
+ if(res.code==20000){
+ if(this.getData.currentPage==1){
+ this.orderList = res.data.list
+ }else{
+ this.orderList = this.orderList.concat(res.data.list)
+ }
}
- console.log(data2)
- oliSiteApi.getNewItemSiteOrder(data2).then(res => {
- console.log(res)
- console.log('-----------------------------------------')
- // console.log('参数', data2.istate, '页码', data2.pageIndex, '来源', from)
- if (res.code === 20000) {
- switch (istate) {
- case -3:
- console.log('获取全部')
- console.log(res.data)
- console.log(this.allOrder)
- this.allOrder = this.allOrder.concat(res.data)
- if (res.data.length < 10) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
- this.load.isLoadMore1 = true
- this.load.loadStatus1 = 'nomore'
- } else if (res.data.length == 10) {
- this.pageNumber1++
- this.load.isLoadMore1 = false
- }
- break
- case -2:
- console.log('退款')
- console.log(res.data)
- console.log(this.allOrder)
- this.refundOrder = this.refundOrder.concat(res.data)
+ console.log(res,'============')
+ })
+ // // console.log(istate)
+ // // console.log(pageNumber)
+ // // console.log(from)
+ // console.log( this.startTime)
+ // console.log( this.endTime)
+ // let that = this
+ // const data2 = {
+ // istate: istate, //类型:Number 必有字段 备注:订单状态 0待支付 1支付成功 查所有传 ''
+ // pageIndex: pageNumber ,//类型:Number 必有字段 备注:查询第几页,默认一页10条
+ // // startTime: that.startTime,
+ // // endTime: that.endTime
+ // }
+ // console.log('这里是this.indexSource',this.indexSource)
+ // if (this.indexSource == 0) {
+ // // 网页版
+ // if (data2.istate == -3) {
+ // data2.istate = ''
+ // } else if (data2.istate == -2) {
+ // data2.istate = 3
+ // }
+ // console.log(data2)
+ // oliSiteApi.getNewItemSiteOrder(data2).then(res => {
+ // // console.log('参数', data2.istate, '页码', data2.pageIndex, '来源', from)
+ // if (res.code === 20000) {
+ // switch (istate) {
+ // case -3:
+ // console.log('获取全部')
+ // console.log(res.data)
+ // console.log(this.allOrder)
+ // this.allOrder = this.allOrder.concat(res.data)
+ // if (res.data.length < 10) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
+ // this.load.isLoadMore1 = true
+ // this.load.loadStatus1 = 'nomore'
+ // } else if (res.data.length == 10) {
+ // this.pageNumber1++
+ // this.load.isLoadMore1 = false
+ // }
+ // break
+ // case -2:
+ // console.log('退款')
+ // console.log(res.data)
+ // console.log(this.allOrder)
+ // this.refundOrder = this.refundOrder.concat(res.data)
- if (res.data.length < 10) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
- this.load.isLoadMore4 = true
- this.load.loadStatus4 = 'nomore'
- } else {
- this.pageNumber4++
- this.load.isLoadMore4 = false
- }
- break
- case 0:
- console.log('待支付')
- console.log(res.data)
- console.log(this.allOrder)
- this.payingOrder = this.payingOrder.concat(res.data)
-
- if (res.data.length < 10) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
- this.load.isLoadMore2 = true
- this.load.loadStatus2 = 'nomore'
- } else {
- this.pageNumber2++
- this.load.isLoadMore2 = false
- }
- break
- case 1:
- console.log('已支付')
- console.log(res.data)
- console.log(this.allOrder)
- this.finishedOrder = this.finishedOrder.concat(res.data)
- if (res.data.length < 10) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
- this.load.isLoadMore3 = true
- this.load.loadStatus3 = 'nomore'
- } else {
- this.pageNumber3++
- this.load.isLoadMore3 = false
- }
- break
-
- }
- }
- })
+ // if (res.data.length < 10) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
+ // this.load.isLoadMore4 = true
+ // this.load.loadStatus4 = 'nomore'
+ // } else {
+ // this.pageNumber4++
+ // this.load.isLoadMore4 = false
+ // }
+ // break
+ // case 0:
+ // console.log('待支付')
+ // console.log(res.data)
+ // console.log(this.allOrder)
+ // this.payingOrder = this.payingOrder.concat(res.data)
+ // if (res.data.length < 10) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
+ // this.load.isLoadMore2 = true
+ // this.load.loadStatus2 = 'nomore'
+ // } else {
+ // this.pageNumber2++
+ // this.load.isLoadMore2 = false
+ // }
+ // break
+ // case 1:
+ // console.log('已支付')
+ // console.log(res.data)
+ // console.log(this.allOrder)
+ // this.finishedOrder = this.finishedOrder.concat(res.data)
+ // if (res.data.length < 10) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
+ // this.load.isLoadMore3 = true
+ // this.load.loadStatus3 = 'nomore'
+ // } else {
+ // this.pageNumber3++
+ // this.load.isLoadMore3 = false
+ // }
+ // break
+ // }
+ // }
+ // })
- } else if (this.indexSource == 1) {
- // 0:待支付, 1:已支付 ,-1:支付失败 ,2:已取消,3:已退款
- // 小程序
- if (data2.istate == -3) {
- data2.istate = ''
- } else if (data2.istate == -2) {
- data2.istate = 3
- }
- console.log(data2)
- oliSiteApi.getNewItemSiteOrder(data2).then(res => {
- console.log(res)
- console.log('+++++++++++++++++++++++++++++++++++++++++')
- // console.log(data2.istate, data2.pageIndex)
- if (res.code === 20000) {
- switch (istate) {
- case 1:
- console.log('获取全部')
- console.log(res.data)
- console.log(this.allOrder)
+ // } else if (this.indexSource == 1) {
+ // // 0:待支付, 1:已支付 ,-1:支付失败 ,2:已取消,3:已退款
+ // // 小程序
+ // if (data2.istate == -3) {
+ // data2.istate = ''
+ // } else if (data2.istate == -2) {
+ // data2.istate = 3
+ // }
+ // console.log(data2)
+ // oliSiteApi.getNewItemSiteOrder(data2).then(res => {
+ // console.log(res)
+ // console.log('+++++++++++++++++++++++++++++++++++++++++')
+ // // console.log(data2.istate, data2.pageIndex)
+ // if (res.code === 20000) {
+ // switch (istate) {
+ // case 1:
+ // console.log('获取全部')
+ // console.log(res.data)
+ // console.log(this.allOrder)
- this.allOrder = this.allOrder.concat(res.data)
- if (res.data.length < 10) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
- this.load.isLoadMore1 = true
- this.load.loadStatus1 = 'nomore'
- } else {
- this.pageNumber1++
- this.load.isLoadMore1 = false
- }
- break
+ // this.allOrder = this.allOrder.concat(res.data)
+ // if (res.data.length < 10) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
+ // this.load.isLoadMore1 = true
+ // this.load.loadStatus1 = 'nomore'
+ // } else {
+ // this.pageNumber1++
+ // this.load.isLoadMore1 = false
+ // }
+ // break
- case -2:
- console.log('退款')
- console.log(res.data)
- console.log(this.allOrder)
- this.refundOrder = this.refundOrder.concat(res.data)
- if (res.data.length < 10) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
- this.load.isLoadMore4 = true
- this.load.loadStatus4 = 'nomore'
- } else {
- this.pageNumber4++
- this.load.isLoadMore4 = false
- }
- break
- case 0:
- console.log('待支付')
- console.log(res.data)
- console.log(this.allOrder)
- this.payingOrder = this.payingOrder.concat(res.data)
- if (res.data.length < 10) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
- this.load.isLoadMore2 = true
- this.load.loadStatus2 = 'nomore'
- } else {
- this.pageNumber2++
- this.load.isLoadMore2 = false
- }
- break
- case -3:
- console.log('全部')
- console.log(res.data)
- console.log(this.allOrder)
+ // case -2:
+ // console.log('退款')
+ // console.log(res.data)
+ // console.log(this.allOrder)
+ // this.refundOrder = this.refundOrder.concat(res.data)
+ // if (res.data.length < 10) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
+ // this.load.isLoadMore4 = true
+ // this.load.loadStatus4 = 'nomore'
+ // } else {
+ // this.pageNumber4++
+ // this.load.isLoadMore4 = false
+ // }
+ // break
+ // case 0:
+ // console.log('待支付')
+ // console.log(res.data)
+ // console.log(this.allOrder)
+ // this.payingOrder = this.payingOrder.concat(res.data)
+ // if (res.data.length < 10) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
+ // this.load.isLoadMore2 = true
+ // this.load.loadStatus2 = 'nomore'
+ // } else {
+ // this.pageNumber2++
+ // this.load.isLoadMore2 = false
+ // }
+ // break
+ // case -3:
+ // console.log('全部')
+ // console.log(res.data)
+ // console.log(this.allOrder)
- this.finishedOrder = this.finishedOrder.concat(res.data)
- if (res.data.length < 10) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
- this.load.isLoadMore3 = true
- this.load.loadStatus3 = 'nomore'
- } else if (res.data.length == 10) {
- this.pageNumber3++
- this.load.isLoadMore3 = false
- }
- break
- }
- }
- })
- }
+ // this.finishedOrder = this.finishedOrder.concat(res.data)
+ // if (res.data.length < 10) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
+ // this.load.isLoadMore3 = true
+ // this.load.loadStatus3 = 'nomore'
+ // } else if (res.data.length == 10) {
+ // this.pageNumber3++
+ // this.load.isLoadMore3 = false
+ // }
+ // break
+ // }
+ // }
+ // })
+ // }
}
}
}
diff --git a/pages/home/home.vue b/pages/home/home.vue
index 79f1985..3ce2ee8 100644
--- a/pages/home/home.vue
+++ b/pages/home/home.vue
@@ -21,7 +21,7 @@
+ @tap="routerTo('/packageOrders/pages/orderList/orderList?type=today')">
今日收款笔数
{{userAccount.totalCount}}
@@ -75,6 +75,15 @@
{{ cuIconList[0].name }}
+
+
+
+
+ {{ cuIconList[4].badge > 99 ? '99+' : cuIconList[4].badge }}
+
+
+ {{ cuIconList[4].name }}
+
@@ -92,18 +101,12 @@
{{ cuIconList[1].name }}
-
-
+