1
This commit is contained in:
122
Activity/pages/index/index.vue
Normal file
122
Activity/pages/index/index.vue
Normal file
@@ -0,0 +1,122 @@
|
|||||||
|
<template>
|
||||||
|
<view class="Activity_body">
|
||||||
|
<scroll-view @refresherrefresh='refresherrefresh' :refresher-enabled='true'
|
||||||
|
:refresher-triggered='refresherTriggered' style="height: 100%;" scroll-y="true"
|
||||||
|
@scrolltolower='scrolltolower'>
|
||||||
|
<view v-for="(item,index) in siteList" :key="item.id">
|
||||||
|
<site-item @tap="toDetail(item)" :site-item="item" class="cu-list menu-avatar cu-item" />
|
||||||
|
<view class="activityContent">{{item.activityDetail}}</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import oilSiteApi from '@/api/oil-site.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
refresherTriggered: false,
|
||||||
|
page: {
|
||||||
|
currentPage: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
params: { //类型:Object 必有字段 备注:// 筛选对象
|
||||||
|
// sort: "juli", //类型:String 必有字段 备注:// 智能排序 ( price:价格最低 juli:距离最近 ) 默认距离排序
|
||||||
|
siteName: '',
|
||||||
|
...uni.getStorageSync('location'),
|
||||||
|
// ...this.filterData
|
||||||
|
// siteBrand: this.siteName ? '' : this.filterDatas
|
||||||
|
siteBrand: '', // 备注:// 石油品牌 ( 1-中国石油 2-中国石化 3-壳牌 4-民营 5-中海油 6-京博 7-中化石油 8-其他 )
|
||||||
|
// channelCode: this.siteName ? '' : this.filterDatas
|
||||||
|
channelCode: '', // 备注:// 渠道编码 ( OIL:星油 WJY:万金油 LV:老吕(找油网) TY:团油 YDJY:一点加油(壳牌))
|
||||||
|
// oilProductCode: this.siteName ? '' : this.filterDatas
|
||||||
|
oilProductCode: '', // 备注:// 油号选择 ( 0# 92# 92#)
|
||||||
|
siteLevel: '',
|
||||||
|
sort: 'juli',
|
||||||
|
provinceCode: '',
|
||||||
|
cityCode: '',
|
||||||
|
areaCode: '',
|
||||||
|
distance: '',
|
||||||
|
clientBelong:'ZHONGPIN'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
siteList: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.init()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
toDetail(item){
|
||||||
|
let itemS = encodeURIComponent(JSON.stringify(item))
|
||||||
|
// console.log(uni.getStorageSync('user'))
|
||||||
|
// return
|
||||||
|
if (uni.getStorageSync('user')) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`,
|
||||||
|
fail: (err) => {
|
||||||
|
// console.log(err)
|
||||||
|
},
|
||||||
|
success: () => {
|
||||||
|
// console.log('err')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.showModal({
|
||||||
|
title: '请您登录',
|
||||||
|
content: "登录小星加油才可以加油 |˛˙꒳˙)♡",
|
||||||
|
confirmText: '去登陆',
|
||||||
|
success: (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '../../../BagAuth/pages/login/login'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
refresherrefresh() {
|
||||||
|
this.page.currentPage =1;
|
||||||
|
this.refresherTriggered = true;
|
||||||
|
this.getSiteList()
|
||||||
|
},
|
||||||
|
init(){
|
||||||
|
this.getSiteList();
|
||||||
|
},
|
||||||
|
getSiteList() {
|
||||||
|
let location = uni.getStorageSync('location');
|
||||||
|
oilSiteApi.getBSitesByActivity(this.page).then(res => {
|
||||||
|
if(this.page.currentPage>1){
|
||||||
|
this.siteList = this.siteList.concat(res.data.list)
|
||||||
|
}else{
|
||||||
|
this.siteList = res.data.list
|
||||||
|
}
|
||||||
|
}).finally(()=>{
|
||||||
|
this.refresherTriggered = false;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
scrolltolower() {
|
||||||
|
this.page.currentPage += 1;
|
||||||
|
this.getSiteList()
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.activityContent{
|
||||||
|
background: #ff670026;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
margin: 10rpx 30rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 20rpx 30rpx;
|
||||||
|
color: #FF6700;
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
|
.Activity_body {
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -31,6 +31,13 @@ export default {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getBSitesByActivity(data) {
|
||||||
|
return request({
|
||||||
|
url: `/${service_name}/${group_name}/getBCSitesByActivity`,
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
},
|
||||||
getSiteLists(data) {
|
getSiteLists(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/${service_name}/${group_name}/findBCSiteInfoByPage`,
|
url: `/${service_name}/${group_name}/findBCSiteInfoByPage`,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name" : "XiaoXing",
|
"name" : "XiaoXing",
|
||||||
"appid" : "__UNI__EA8D131",
|
"appid" : "__UNI__113D280",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.0.0",
|
"versionName" : "1.0.0",
|
||||||
"versionCode" : "100",
|
"versionCode" : "100",
|
||||||
|
|||||||
16
pages.json
16
pages.json
@@ -141,6 +141,22 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"root": "Activity",
|
||||||
|
"pages": [{
|
||||||
|
"path" : "pages/index/index",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText": "油站活动",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationStyle": "default",
|
||||||
|
"navigationBarBackgroundColor": "#0081ff",
|
||||||
|
"navigationBarTextStyle": "white"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"root": "BagMoney",
|
"root": "BagMoney",
|
||||||
"pages": [{
|
"pages": [{
|
||||||
|
|||||||
@@ -15,9 +15,10 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="search-form radius" @tap="InputFocus">
|
<view class="search-form radius" @tap="InputFocus">
|
||||||
<text class="cuIcon-search"></text>
|
<text class="cuIcon-search"></text>
|
||||||
<input disabled :adjust-position="false" type="text" placeholder="搜索油站名称" confirm-type="search" />
|
<input disabled :adjust-position="false" type="text" placeholder="搜索油站名称"
|
||||||
|
confirm-type="search" />
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="">
|
<!-- <view class="">
|
||||||
阿三
|
阿三
|
||||||
</view> -->
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
@@ -108,16 +109,16 @@
|
|||||||
</view>
|
</view>
|
||||||
<!-- 广告图片开始 -->
|
<!-- 广告图片开始 -->
|
||||||
<view class="my-bg padding">
|
<view class="my-bg padding">
|
||||||
<view class="" >
|
<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">
|
<swiper-item @click="swiperClick(item,index)" v-for="(item,index) in swiperArray">
|
||||||
<image :src="item.src" style="width: 100%;" mode="widthFix"></image>
|
<image :src="item.src" style="width: 100%;" mode="widthFix"></image>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
<swiper-item>
|
<!-- <swiper-item>
|
||||||
<ad unit-id="adunit-fae65289bc72095d" ad-intervals="30"></ad>
|
<ad unit-id="adunit-fae65289bc72095d" ad-intervals="30"></ad>
|
||||||
</swiper-item>
|
</swiper-item> -->
|
||||||
</swiper> -->
|
</swiper>
|
||||||
<image :src="starUrl+'banner.png'" style="width: 100%;" mode="widthFix"></image>
|
<!-- <image :src="starUrl+'banner.png'" style="width: 100%;" mode="widthFix"></image> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 筛选开始 -->
|
<!-- 筛选开始 -->
|
||||||
@@ -127,8 +128,8 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
<view class=" ">
|
<view class=" ">
|
||||||
<view class="" v-if="siteList.length>0">
|
<view class="" v-if="siteList.length>0">
|
||||||
<site-item v-for="(item,index) in siteList" :key="item.id" :site-item="item" :first="index==0" :listHeight="listHeight"
|
<site-item v-for="(item,index) in siteList" :key="item.id" :site-item="item" :first="index==0"
|
||||||
class="cu-list menu-avatar cu-item" @tap="toDetail(item)">
|
:listHeight="listHeight" class="cu-list menu-avatar cu-item" @tap="toDetail(item)">
|
||||||
</site-item>
|
</site-item>
|
||||||
</view>
|
</view>
|
||||||
<view class="" v-else>
|
<view class="" v-else>
|
||||||
@@ -158,17 +159,21 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
swiperArray:[
|
swiperArray: [
|
||||||
// {
|
// {
|
||||||
// src:this.global.starUrl+'banner.png',
|
// src:this.global.starUrl+'banner.png',
|
||||||
// link:''
|
// link:''
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
src: 'https://xoil-public.oss-cn-beijing.aliyuncs.com/WMP-IMG/banner-2dwk.png',
|
src: 'https://xoil-public.oss-cn-beijing.aliyuncs.com/baichuan_MP/banner_baichuan.png',
|
||||||
link: 'https://tengxun.hkzj168.com/?ChannelId=20220831152210221048473'
|
JumpPage: '/Activity/pages/index/index'
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// src: 'https://xoil-public.oss-cn-beijing.aliyuncs.com/WMP-IMG/banner-2dwk.png',
|
||||||
|
// link: 'https://tengxun.hkzj168.com/?ChannelId=20220831152210221048473'
|
||||||
|
// },
|
||||||
],
|
],
|
||||||
listHeight:160,
|
listHeight: 160,
|
||||||
siteInfo: {
|
siteInfo: {
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -285,13 +290,13 @@
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onTabItemTap(res){
|
onTabItemTap(res) {
|
||||||
this.showThreeSites =false
|
this.showThreeSites = false
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.reverseGeocoder(this.location)
|
this.reverseGeocoder(this.location)
|
||||||
this.refreshLocation()
|
this.refreshLocation()
|
||||||
|
|
||||||
// if (!uni.getStorageSync('filterData')) {
|
// if (!uni.getStorageSync('filterData')) {
|
||||||
// this.getFilterData()
|
// this.getFilterData()
|
||||||
// }
|
// }
|
||||||
@@ -329,38 +334,45 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
toManagement(){
|
toManagement() {
|
||||||
const user = uni.getStorageSync('user');
|
const user = uni.getStorageSync('user');
|
||||||
if(user){
|
if (user) {
|
||||||
Financial.findHomePageReport({customerId:user.id}).then(res=>{
|
Financial.findHomePageReport({
|
||||||
if(res.data){
|
customerId: user.id
|
||||||
|
}).then(res => {
|
||||||
|
if (res.data) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:`../../../Financial/pages/estimate/index?data=${encodeURIComponent(JSON.stringify(res.data))}`
|
url: `../../../Financial/pages/estimate/index?data=${encodeURIComponent(JSON.stringify(res.data))}`
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'../../../Financial/pages/index?guide=1'
|
url: '../../../Financial/pages/index?guide=1'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else{
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请先登录!',
|
title: '请先登录!',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
swiperClick(item,index) {
|
swiperClick(item, index) {
|
||||||
if(!item?.link) return
|
// if (!item?.link) return
|
||||||
switch (Number(index)) {
|
// switch (Number(index)) {
|
||||||
// case 0:
|
// // case 0:
|
||||||
// this.goCall()
|
// // this.goCall()
|
||||||
// break;
|
// // break;
|
||||||
default:
|
// default:
|
||||||
console.log('item.link')
|
// console.log('item.link')
|
||||||
uni.navigateTo({
|
// uni.navigateTo({
|
||||||
url: '/pages/tabbar/home/link?url=' + encodeURIComponent(JSON.stringify(item.link))
|
// url: '/pages/tabbar/home/link?url=' + encodeURIComponent(JSON.stringify(item.link))
|
||||||
})
|
// })
|
||||||
|
// }
|
||||||
|
if(item?.JumpPage){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: item.JumpPage
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
goToPage(url) {
|
goToPage(url) {
|
||||||
@@ -447,10 +459,11 @@
|
|||||||
// url: 'plugin://routePlan/index?key=' + this.qqMapKey + '&referer=' + referer +
|
// url: 'plugin://routePlan/index?key=' + this.qqMapKey + '&referer=' + referer +
|
||||||
// '&endPoint=' + endPoint
|
// '&endPoint=' + endPoint
|
||||||
// })
|
// })
|
||||||
uni.removeStorageSync("origins")
|
uni.removeStorageSync("origins")
|
||||||
uni.removeStorageSync("destination")
|
uni.removeStorageSync("destination")
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url:'../../../BagStation/pages/routePlain/routePlain'})
|
url: '../../../BagStation/pages/routePlain/routePlain'
|
||||||
|
})
|
||||||
} else if (index == 8) {
|
} else if (index == 8) {
|
||||||
this.goToPage('/BagAuth/pages/agreeMent/OperationGuide')
|
this.goToPage('/BagAuth/pages/agreeMent/OperationGuide')
|
||||||
}
|
}
|
||||||
@@ -498,9 +511,9 @@
|
|||||||
// siteBrand: "", // 备注:// 石油品牌 ( 1-中国石油 2-中国石化 3-壳牌 4-民营 5-中海油 6-京博 7-中化石油 8-其他 )
|
// siteBrand: "", // 备注:// 石油品牌 ( 1-中国石油 2-中国石化 3-壳牌 4-民营 5-中海油 6-京博 7-中化石油 8-其他 )
|
||||||
// channelCode: "", // 备注:// 渠道编码 ( OIL:星油 WJY:万金油 LV:老吕(找油网) TY:团油 YDJY:一点加油(壳牌))
|
// channelCode: "", // 备注:// 渠道编码 ( OIL:星油 WJY:万金油 LV:老吕(找油网) TY:团油 YDJY:一点加油(壳牌))
|
||||||
// oilProductCode: "0#" // 备注:// 油号选择 ( 0# 92# 92#)
|
// oilProductCode: "0#" // 备注:// 油号选择 ( 0# 92# 92#)
|
||||||
clientBelong:'ZHONGPIN',
|
clientBelong: 'ZHONGPIN',
|
||||||
comprehensiveSort:1,
|
comprehensiveSort: 1,
|
||||||
zpDisable:'ENABLE',
|
zpDisable: 'ENABLE',
|
||||||
sort: "juli", //类型:String 必有字段 备注:// 智能排序 ( price:价格最低 juli:距离最近 ) 默认距离排序
|
sort: "juli", //类型:String 必有字段 备注:// 智能排序 ( price:价格最低 juli:距离最近 ) 默认距离排序
|
||||||
...uni.getStorageSync('location'),
|
...uni.getStorageSync('location'),
|
||||||
...this.filterData,
|
...this.filterData,
|
||||||
@@ -566,13 +579,13 @@
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title:'请您登录',
|
title: '请您登录',
|
||||||
content:"登录小星加油才可以加油 |˛˙꒳˙)♡",
|
content: "登录小星加油才可以加油 |˛˙꒳˙)♡",
|
||||||
confirmText:'去登陆',
|
confirmText: '去登陆',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if(res.confirm){
|
if (res.confirm) {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url:'../../../BagAuth/pages/login/login'
|
url: '../../../BagAuth/pages/login/login'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -789,4 +802,4 @@
|
|||||||
.my-icon-sm .text-sm {
|
.my-icon-sm .text-sm {
|
||||||
line-height: 1rem;
|
line-height: 1rem;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -2,9 +2,9 @@ import axios from 'axios'
|
|||||||
import utils from '@/utils/encode'
|
import utils from '@/utils/encode'
|
||||||
|
|
||||||
// const env = process.env.NODE_ENV
|
// const env = process.env.NODE_ENV
|
||||||
// const env = 'production'/* */
|
const env = 'production'/* */
|
||||||
const env = 'production'
|
// const env = 'test'
|
||||||
const testUrl = 'http://192.168.110.230:38080'
|
const testUrl = 'http://192.168.0.254:38080'
|
||||||
// const productUrl = 'http://121.196.213.68/adminapi' //预生产
|
// const productUrl = 'http://121.196.213.68/adminapi' //预生产
|
||||||
|
|
||||||
const productUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new
|
const productUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new
|
||||||
|
|||||||
Reference in New Issue
Block a user