diff --git a/App.vue b/App.vue
index d06c90b..f82fa64 100644
--- a/App.vue
+++ b/App.vue
@@ -8,6 +8,35 @@
export default {
data() {
return {
+ menuList: [{
+ title: '渠道',
+ isMutiple: false,
+ key: 'channelCode',
+ detailList: [{
+ title: "全部",
+ value: ""
+ }]
+ },
+ {
+ title: '0#轻柴油',
+ key: 'oilProductCode',
+ isMutiple: false,
+ detailList: [{
+ title: "全部",
+ value: ""
+ }]
+ },
+ {
+ title: '品牌',
+ key: 'siteBrand',
+ isSort: true,
+ isMutiple: false,
+ detailList: [{
+ title: "全部",
+ value: ""
+ }]
+ }
+ ],
loginStatus: 'online',
msg: ''
}
@@ -69,11 +98,13 @@
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(uni.getStorageSync('filterData'),'pppppppppppppppppppppppp')
// this.$refs.slFilter.resetMenuList(this.menuList)
}
})
},
onShareAppMessage() {
+ let that = this
wx.onAppRoute(() => {
let white = ['BagStation/pages/stationDetail/stationDetail']
// console.log('当前页面路由发生变化 触发该事件onShareAppMessage')
@@ -86,7 +117,7 @@
// data.isOverShare = true
view.onShareAppMessage = () => { //重写分享配置
return {
- title: '百川加油',
+ title: '中品加油',
path: "/pages/index/startPage/startPage", //若无path 默认跳转分享页
// imageUrl:'/image/onshowMessage.png' //若无imageUrl 截图当前页面
imageUrl: 'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/login-bg.png',
@@ -121,8 +152,12 @@
clearTimeout(onlineTimer)
}
})
+ }else{
+ // if(!uni.getStorageSync('filterData')){
+ // that.getFilterData()
+ // }
}
- }, 1000)
+ }, 500)
} else {
// loginTimer = setTimeout(() => {
diff --git a/BagAuth/pages/login/components/loginBottom.vue b/BagAuth/pages/login/components/loginBottom.vue
index 2dfbe9f..59674ad 100644
--- a/BagAuth/pages/login/components/loginBottom.vue
+++ b/BagAuth/pages/login/components/loginBottom.vue
@@ -8,7 +8,7 @@
我已阅读并同意
- 《用户协议》和《隐私政策》
+ 《用户协议》和《隐私政策》
diff --git a/BagAuth/pages/login/login.vue b/BagAuth/pages/login/login.vue
index cfeee55..8d18d54 100644
--- a/BagAuth/pages/login/login.vue
+++ b/BagAuth/pages/login/login.vue
@@ -25,7 +25,7 @@
-
+
diff --git a/BagAuth/pages/login/oldLogin.vue b/BagAuth/pages/login/oldLogin.vue
index 4a56641..b098323 100644
--- a/BagAuth/pages/login/oldLogin.vue
+++ b/BagAuth/pages/login/oldLogin.vue
@@ -7,9 +7,9 @@
:style="'background-image: url('+imgURL+'login-bg-top.png);height: 480upx;'">
-
+
- 一路油你 百川加油
+ 一路油你 中品加油
登录后加油更便捷
@@ -29,7 +29,7 @@
-->
个人账号
@@ -77,7 +77,7 @@
-
-
-
+
+
{{ item.areaName }}
@@ -119,16 +119,18 @@
}
},
created() {
- setTimeout(()=>{
- if(this.areaCodeList1.length == 0){
- this.areaCodeList = uni.getStorageSync('areaCodeList')
- }else{
- this.areaCodeList = this.areaCodeList1
- }
- this.areaCodeList.unshift({areaName:'全部'})
- },1000)
+
console.log('%c 子组件参数↓','font-size:30px;color:red')
},
+ mounted() {
+ if(this.areaCodeList1.length == 0){
+ this.areaCodeList = uni.getStorageSync('areaCodeList')
+ }else{
+ this.areaCodeList = this.areaCodeList1
+ }
+ this.areaCodeList.unshift({areaName:'全部'})
+ this.$forceUpdate();
+ },
computed: {
selectedTitleObj() {
let obj = {}
diff --git a/components/three-sites.vue b/components/three-sites.vue
index 3a01efd..f5e9fbf 100644
--- a/components/three-sites.vue
+++ b/components/three-sites.vue
@@ -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)
+
}
})
},
diff --git a/main.js b/main.js
index 56e81ff..6293d4b 100644
--- a/main.js
+++ b/main.js
@@ -15,7 +15,7 @@ import global from '@/api/global.js'
import Empty from '@/components/Empty.vue'
import {share} from './mixins/index.js'
-
+import oilSiteApi from '@/api/oil-site.js'
Vue.mixin(share)
// Vue.component('home', home)
// Vue.component('user', user)
@@ -33,6 +33,77 @@ Vue.prototype.moneyIntercept = function(value){
return Number(value).toFixed(2)
}
}
+Vue.prototype.SetFilterData = function(value){
+ return new Promise((re,rj)=>{
+ let menuList = [{
+ title: '渠道',
+ isMutiple: false,
+ key: 'channelCode',
+ detailList: [{
+ title: "全部",
+ value: ""
+ }]
+ },
+ {
+ title: '0#轻柴油',
+ key: 'oilProductCode',
+ isMutiple: false,
+ detailList: [{
+ title: "全部",
+ value: ""
+ }]
+ },
+ {
+ title: '品牌',
+ key: 'siteBrand',
+ isSort: true,
+ isMutiple: false,
+ detailList: [{
+ title: "全部",
+ value: ""
+ }]
+ }
+ ]
+ if(uni.getStorageSync('filterData')){
+ re('ok')
+ }else{
+ oilSiteApi.getCheckInfo().then(res => {
+ if (res.code == 20000) {
+ let channelCodes = []
+ res.data.channelCodes.map(item => {
+ channelCodes.push({
+ title: item.name,
+ value: item.id
+ })
+ })
+ let productCodes = []
+ res.data.productCodes.map(item => {
+ productCodes.push({
+ title: item.name,
+ value: item.id
+ })
+ })
+ let siteBrands = []
+ res.data.siteBrands.map(item => {
+ siteBrands.push({
+ title: item.name,
+ value: item.id
+ })
+ })
+ console.log(channelCodes, productCodes, siteBrands)
+ menuList[0].detailList = menuList[0].detailList.concat(channelCodes)
+ menuList[1].detailList = menuList[1].detailList.concat(productCodes)
+ menuList[2].detailList = menuList[2].detailList.concat(siteBrands)
+ uni.setStorageSync('filterData', this.menuList);
+ re('ok')
+ }else{
+ rj('no')
+ }
+ })
+ }
+
+ })
+}
let qqmapsdk = new QQMapWX({
// key: 'IUKBZ-5MKL3-HXB3P-3OS7U-6MHX3-MYBI3'
key:'NYEBZ-YURY3-XTU3N-YBR54-PKW6E-ROB2F'
diff --git a/package-lock.json b/package-lock.json
index 14853a8..8ca7c4d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,37 +1,62 @@
{
"name": "wechat-oil",
"version": "1.0.0",
- "lockfileVersion": 1,
+ "lockfileVersion": 3,
"requires": true,
- "dependencies": {
- "axios": {
+ "packages": {
+ "": {
+ "name": "wechat-oil",
+ "version": "1.0.0",
+ "license": "ISC",
+ "devDependencies": {
+ "axios": "^0.21.3",
+ "crypto-js": "^4.0.0",
+ "js-cookie": "^2.2.1",
+ "js-md5": "^0.7.3"
+ }
+ },
+ "node_modules/axios": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.3.tgz",
"integrity": "sha512-JtoZ3Ndke/+Iwt5n+BgSli/3idTvpt5OjKyoCmz4LX5+lPiY5l7C1colYezhlxThjNa/NhngCUWZSZFypIFuaA==",
"dev": true,
- "requires": {
+ "dependencies": {
"follow-redirects": "^1.14.0"
}
},
- "crypto-js": {
+ "node_modules/crypto-js": {
"version": "4.0.0",
"resolved": "https://registry.nlark.com/crypto-js/download/crypto-js-4.0.0.tgz",
"integrity": "sha1-KQSrJnep0EKFai6i74DekuSjbcw=",
"dev": true
},
- "follow-redirects": {
+ "node_modules/follow-redirects": {
"version": "1.14.3",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.3.tgz",
"integrity": "sha512-3MkHxknWMUtb23apkgz/83fDoe+y+qr0TdgacGIA7bew+QLBo3vdgEN2xEsuXNivpFy4CyDhBBZnNZOtalmenw==",
- "dev": true
+ "dev": true,
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://github.com/sponsors/RubenVerborgh"
+ }
+ ],
+ "engines": {
+ "node": ">=4.0"
+ },
+ "peerDependenciesMeta": {
+ "debug": {
+ "optional": true
+ }
+ }
},
- "js-cookie": {
+ "node_modules/js-cookie": {
"version": "2.2.1",
"resolved": "https://registry.npm.taobao.org/js-cookie/download/js-cookie-2.2.1.tgz",
"integrity": "sha1-aeEG3F1YBolFYpAqpbrsN0Tpsrg=",
"dev": true
},
- "js-md5": {
+ "node_modules/js-md5": {
"version": "0.7.3",
"resolved": "https://registry.npm.taobao.org/js-md5/download/js-md5-0.7.3.tgz",
"integrity": "sha1-tPL7sLMnRV9ZjWcn447Ccs0Jw/I=",
diff --git a/pages.json b/pages.json
index 247acaf..ad7786d 100644
--- a/pages.json
+++ b/pages.json
@@ -3,20 +3,20 @@
{
"path": "pages/index/startPage/startPage",
"style": {
- "navigationBarTitleText": "佰川加油"
+ "navigationBarTitleText": "中品加油"
}
},
{
"path": "pages/tabbar/home/home",
"style": {
- "navigationBarTitleText": "佰川加油" // "enablePullDownRefresh": true
+ "navigationBarTitleText": "中品加油" // "enablePullDownRefresh": true
}
},
{
"path": "pages/tabbar/order/orderList/orderList",
"style": {
- "navigationBarTitleText": "佰川加油", // "enablePullDownRefresh": true
+ "navigationBarTitleText": "中品加油", // "enablePullDownRefresh": true
"enablePullDownRefresh": true
}
},
@@ -24,7 +24,7 @@
{
"path": "pages/tabbar/station/stationList",
"style": {
- "navigationBarTitleText": "佰川加油", // "enablePullDownRefresh": true
+ "navigationBarTitleText": "中品加油", // "enablePullDownRefresh": true
"enablePullDownRefresh": true
}
},
@@ -32,7 +32,7 @@
{
"path": "pages/tabbar/user/user",
"style": {
- "navigationBarTitleText": "佰川加油" // "enablePullDownRefresh": true
+ "navigationBarTitleText": "中品加油" // "enablePullDownRefresh": true
}
}
@@ -275,7 +275,7 @@
"allowsBounceVertical": "NO"
},
"navigationBarBackgroundColor": "#f33e54",
- "navigationBarTitleText": "佰川加油",
+ "navigationBarTitleText": "中品加油",
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
},
diff --git a/pages/components/showModels.vue b/pages/components/showModels.vue
index ba382ce..2b9a8f0 100644
--- a/pages/components/showModels.vue
+++ b/pages/components/showModels.vue
@@ -6,7 +6,7 @@
-
+
@@ -83,6 +83,7 @@
},
data() {
return {
+ otherImgURL: this.global.otherImgURL,
imgURL: this.global.imgURL,
showPlateList: true,
showInputList: false,
diff --git a/pages/index/startPage/startPage.vue b/pages/index/startPage/startPage.vue
index 6bd4b7b..65eba0b 100644
--- a/pages/index/startPage/startPage.vue
+++ b/pages/index/startPage/startPage.vue
@@ -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,23 +60,91 @@
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 => {
if (res.code == 20000) {
+ console.log('接口返回正常')
let channelCodes = []
res.data.channelCodes.map(item => {
channelCodes.push({
@@ -169,7 +170,8 @@
this.menuList[0].detailList = this.menuList[0].detailList.concat(channelCodes)
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)
+ uni.setStorageSync('filterData', this.menuList);
+ console.log('存入', this.menuList)
// this.$refs.slFilter.resetMenuList(this.menuList)
}
})
diff --git a/pages/tabbar/home/home.vue b/pages/tabbar/home/home.vue
index 12bc10c..d113e8e 100644
--- a/pages/tabbar/home/home.vue
+++ b/pages/tabbar/home/home.vue
@@ -106,42 +106,18 @@
-
-
-
+
+ -->
+
@@ -517,6 +493,7 @@
currentPage: 1,
pageSize: 10,
params: { //类型:Object 必有字段 备注:// 筛选对象
+ clientBelong:'ZHONGPIN',
sort: "juli", //类型:String 必有字段 备注:// 智能排序 ( price:价格最低 juli:距离最近 ) 默认距离排序
// longitude: 117.157817, // 必有字段 备注:// 当前位置经度
// latitude: 31.802472, // 必有字段 备注:// 当前位置维度
diff --git a/pages/tabbar/order/orderList/orderList.vue b/pages/tabbar/order/orderList/orderList.vue
index 83fd3ba..9fad373 100644
--- a/pages/tabbar/order/orderList/orderList.vue
+++ b/pages/tabbar/order/orderList/orderList.vue
@@ -98,6 +98,7 @@
data() {
return {
+ getSiteListTimer:null,
TabCur: 0,
search: '',
status: {
@@ -136,7 +137,7 @@
}
},
onShow() {
- this.initList()
+ // this.initList()
},
onLoad() {
this.initList()
@@ -214,117 +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 必有字段 备注:无
- orderStatus: id == '全部' ? '' : (id +''), //类型:String 必有字段 备注:订单状态 0:待支付, 1:已支付 ,-1:支付失败 ,2:已取消,3:已退款
- 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:支付失败 ,2:已取消,3:已退款
- 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:支付失败 ,2:已取消,3:已退款
+ 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:支付失败 ,2:已取消,3:已退款
+ 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)
+
}
}
}
diff --git a/pages/tabbar/qrCenter/qrCenter.vue b/pages/tabbar/qrCenter/qrCenter.vue
index af237df..6d5d47d 100644
--- a/pages/tabbar/qrCenter/qrCenter.vue
+++ b/pages/tabbar/qrCenter/qrCenter.vue
@@ -1,7 +1,7 @@
- 佰川加油
+ 中品加油
-
+
-