caolc #13
133
Activity/pages/index/index.vue
Normal file
133
Activity/pages/index/index.vue
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
<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: '',
|
||||||
|
clientBelong:'BAICHUAN',
|
||||||
|
...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: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
siteList: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.init()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
toDetail(item){
|
||||||
|
let itemS = JSON.stringify(item)
|
||||||
|
if (uni.getStorageSync('user')) {
|
||||||
|
if (item.channelCode === 'TY') {
|
||||||
|
uni.setStorageSync('OtherSiteInfo', item)
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/BagStation/pages/stationDetail/stationDetail?channerCode=${item.channelCode}`,
|
||||||
|
fail: (err) => {
|
||||||
|
// console.log(err)
|
||||||
|
},
|
||||||
|
success: () => {
|
||||||
|
// console.log('err')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
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.getBCSitesByActivity(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>
|
||||||
@@ -38,6 +38,13 @@ export default {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getBCSitesByActivity(data) {
|
||||||
|
return request({
|
||||||
|
url: `/${service_name}/${group_name}/getBCSitesByActivity`,
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
},
|
||||||
getSiteDetails(data) {
|
getSiteDetails(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/${service_name}/${group_name}/getSiteDetails`,
|
url: `/${service_name}/${group_name}/getSiteDetails`,
|
||||||
|
|||||||
16
pages.json
16
pages.json
@@ -120,6 +120,22 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"root": "Activity",
|
||||||
|
"pages": [{
|
||||||
|
"path" : "pages/index/index",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText": "油站活动",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationStyle": "default",
|
||||||
|
"navigationBarBackgroundColor": "#fe0505",
|
||||||
|
"navigationBarTextStyle": "white"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"root": "Financial",
|
"root": "Financial",
|
||||||
"pages": [{
|
"pages": [{
|
||||||
|
|||||||
@@ -59,12 +59,13 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="text-xxl" @tap="toManagement">
|
<view class="text-xxl" @tap="toManagement">
|
||||||
<view class="cuIcon-form">
|
<view class="cuIcon-form">
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<text class="text-df">
|
<text class="text-df">
|
||||||
中交风控
|
中交风控
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -151,12 +152,12 @@
|
|||||||
<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>
|
|
||||||
<ad unit-id="adunit-fae65289bc72095d" ad-intervals="30"></ad>
|
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
|
<!-- <swiper-item>
|
||||||
|
<ad unit-id="adunit-fae65289bc72095d" ad-intervals="30"></ad>
|
||||||
|
</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>
|
||||||
@@ -204,9 +205,13 @@
|
|||||||
// 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',
|
||||||
|
// link: 'https://tengxun.hkzj168.com/?ChannelId=20220831152210221048473'
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
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'
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
listHeight: 160,
|
listHeight: 160,
|
||||||
@@ -354,6 +359,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
toActivity(){},
|
||||||
toManagement() {
|
toManagement() {
|
||||||
const user = uni.getStorageSync('user');
|
const user = uni.getStorageSync('user');
|
||||||
if (user) {
|
if (user) {
|
||||||
@@ -378,10 +384,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
swiperClick(item, index) {
|
swiperClick(item, index) {
|
||||||
if (!item?.link) return
|
// if (!item?.link) return
|
||||||
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) {
|
||||||
if (!url) return;
|
if (!url) return;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ 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 = 'test'
|
// const env = 'test'
|
||||||
const testUrl = 'http://192.168.0.45: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