1212
This commit is contained in:
@@ -136,7 +136,7 @@
|
||||
<view class="">
|
||||
<swiper autoplay interval='5000' style="width: 100%;height: 204rpx;" class="swiper" circular>
|
||||
<swiper-item @click="swiperClick(item,index)" v-for="(item,index) in swiperArray" :key='index'>
|
||||
<image :src="item.src" style="width: 100%;" mode="widthFix"></image>
|
||||
<image :src="item.src" style="width: 100%;height: 100%;"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
@@ -188,6 +188,10 @@
|
||||
src: 'https://xoil-public.oss-cn-beijing.aliyuncs.com/WMP-IMG/banner-2dwk.png',
|
||||
link: 'https://tengxun.hkzj168.com/?ChannelId=20220831152210221048473'
|
||||
},
|
||||
{
|
||||
src:'https://xoil-public.oss-cn-beijing.aliyuncs.com/baichuan_MP/bannerindexs.png',
|
||||
JumpPage:'Financial'
|
||||
},
|
||||
|
||||
],
|
||||
siteInfo: {},
|
||||
@@ -352,7 +356,6 @@
|
||||
console.log('首页 非卡力 进入')
|
||||
},
|
||||
onLoad(e) {
|
||||
console.log(e, '首页')
|
||||
let _that = this
|
||||
let IsOtherUser = _that.isOther
|
||||
console.log(IsOtherUser, '这里是判断是否为卡力')
|
||||
@@ -369,7 +372,17 @@
|
||||
return
|
||||
}
|
||||
console.log('首页 非卡力 进入测试++')
|
||||
this.reverseGeocoder(this.location)
|
||||
this.reverseGeocoder(this.location);
|
||||
setTimeout(()=>{
|
||||
let startParamsData = uni.getStorageSync('isJump')||null;
|
||||
if(startParamsData){
|
||||
this.shadoumeiyou(6)
|
||||
if(startParamsData?.disposable){
|
||||
uni.removeStorageSync('isJump');
|
||||
}
|
||||
|
||||
}
|
||||
},500)
|
||||
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
@@ -411,17 +424,22 @@
|
||||
},
|
||||
methods: {
|
||||
swiperClick(item,index) {
|
||||
if(!item?.link) return
|
||||
switch (Number(index)) {
|
||||
// case 0:
|
||||
// this.goCall()
|
||||
// break;
|
||||
default:
|
||||
console.log('item.link')
|
||||
uni.navigateTo({
|
||||
url: '/pages/tabbar/home/link?url=' + encodeURIComponent(JSON.stringify(item.link))
|
||||
})
|
||||
if(item?.JumpPage){
|
||||
switch(item.JumpPage){
|
||||
case "Financial":
|
||||
this.shadoumeiyou(6)
|
||||
break;
|
||||
}
|
||||
}else if(item?.link){
|
||||
switch (Number(index)) {
|
||||
default:
|
||||
console.log('item.link')
|
||||
uni.navigateTo({
|
||||
url: '/pages/tabbar/home/link?url=' + encodeURIComponent(JSON.stringify(item.link))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
gotoMap() {
|
||||
uni.navigateTo({
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
|
||||
data() {
|
||||
return {
|
||||
getSiteListTimer:null,
|
||||
TabCur: 0,
|
||||
TabCurUrea: 0,
|
||||
UreaTabCur:0,
|
||||
@@ -131,7 +132,7 @@
|
||||
ative:'', }
|
||||
},
|
||||
onShow() {
|
||||
this.getOrder('')
|
||||
// this.getOrder('')
|
||||
},
|
||||
onLoad() {
|
||||
this.getOrder('')
|
||||
@@ -177,6 +178,7 @@
|
||||
})
|
||||
},
|
||||
onChangeSearch() {
|
||||
console.log('%c 我闪','color:red;font-size:20px')
|
||||
setTimeout(() => {
|
||||
if(this.TabHead == 1){
|
||||
this.onSearch()
|
||||
@@ -202,34 +204,39 @@
|
||||
this.ative = value
|
||||
this.getOrder(value)
|
||||
},
|
||||
getOrder(status) {
|
||||
let postData = {
|
||||
currentPage: this.currentPage, //类型:Number 必有字段 备注:无
|
||||
pageSize: 10, //类型:Number 必有字段 备注:无
|
||||
params: { //类型:Object 必有字段 备注:无
|
||||
orderStatus: status, //类型:String 必有字段 备注:订单状态 0:待支付, 1:已支付 ,-1:支付失败 ,2:已取消,3:已退款
|
||||
search: this.search //类型:String 必有字段 备注:搜索 ( 油站名称/ 订单编号/ 油品)
|
||||
},
|
||||
}
|
||||
orderApi.getOrderInfoByPage(postData).then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 20000) {
|
||||
// 0:待支付, 1:已支付 ,-1:支付失败 ,2:已取消,3:已退款
|
||||
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++
|
||||
this.status.loadOrderStatus = 'load'
|
||||
}
|
||||
}
|
||||
}).finally(()=>{
|
||||
uni.stopPullDownRefresh()
|
||||
})
|
||||
getOrder(status) {
|
||||
clearTimeout(this.getSiteListTimer)
|
||||
this.getSiteListTimer = setTimeout(()=>{
|
||||
|
||||
let postData = {
|
||||
currentPage: this.currentPage, //类型:Number 必有字段 备注:无
|
||||
pageSize: 10, //类型:Number 必有字段 备注:无
|
||||
params: { //类型:Object 必有字段 备注:无
|
||||
orderStatus: status, //类型:String 必有字段 备注:订单状态 0:待支付, 1:已支付 ,-1:支付失败 ,2:已取消,3:已退款
|
||||
search: this.search //类型:String 必有字段 备注:搜索 ( 油站名称/ 订单编号/ 油品)
|
||||
},
|
||||
}
|
||||
orderApi.getOrderInfoByPage(postData).then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 20000) {
|
||||
// 0:待支付, 1:已支付 ,-1:支付失败 ,2:已取消,3:已退款
|
||||
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++
|
||||
this.status.loadOrderStatus = 'load'
|
||||
}
|
||||
}
|
||||
}).finally(()=>{
|
||||
uni.stopPullDownRefresh()
|
||||
})
|
||||
|
||||
},500)
|
||||
},
|
||||
|
||||
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
|
||||
data() {
|
||||
return {
|
||||
getSiteListTimer:null,
|
||||
areaCodeList:[],
|
||||
loadText:'more',
|
||||
changeHs:true,
|
||||
@@ -677,20 +678,30 @@
|
||||
|
||||
},
|
||||
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 = []
|
||||
if(this.TabHead == 0){
|
||||
this.getSiteList()
|
||||
}else if (this.TabHead == 1){
|
||||
this.getUreaList()
|
||||
}
|
||||
clearTimeout(this.getSiteListTimer);
|
||||
this.getSiteListTimer = setTimeout(()=>{
|
||||
this.currentPage = 1
|
||||
this.siteList = []
|
||||
if(this.TabHead == 0){
|
||||
this.getSiteList()
|
||||
}else if (this.TabHead == 1){
|
||||
this.getUreaList()
|
||||
}
|
||||
},500)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user