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>
|
||||
2
App.vue
2
App.vue
@@ -113,7 +113,7 @@
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
uni.redirectTo({
|
||||
url: '/BagAuth/pages/login/login'
|
||||
url: '/BagAuth/pages/login/login?loginType=true'
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="login-page bg-white">
|
||||
<view v-if="loginType" class="login-page bg-white">
|
||||
<view class="image login-bg">
|
||||
<!-- <image :src="imgURL+'login-bg.png'" mode="widthFix"></image> -->
|
||||
<!-- <image src="../../../BagStation/static/img/LV.png" mode="widthFix"></image> -->
|
||||
@@ -73,6 +73,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loginType:false,
|
||||
// imgsrc:require('../../../BagStation/static/img/login-bg.png'),
|
||||
checked: false,
|
||||
userHandle: false,
|
||||
@@ -91,7 +92,11 @@
|
||||
loginOut: uni.getStorageSync('loginOut') ? true : false
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
onLoad(e) {
|
||||
if(e.loginType){
|
||||
this.loginType = Boolean(e.loginType);
|
||||
console.log(e.loginType,'e.loginType')
|
||||
}
|
||||
uni.clearStorageSync()
|
||||
// this.refreshLocation()
|
||||
uni.login({
|
||||
@@ -138,6 +143,7 @@
|
||||
this.checked = val
|
||||
},
|
||||
refuseLogin() {
|
||||
uni.setStorageSync('loginType',false)
|
||||
uni.switchTab({
|
||||
url: '/pages/tabbar/home/home'
|
||||
})
|
||||
@@ -200,8 +206,7 @@
|
||||
oilIdentityApi.bindLoginByPhone(data, url).then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 20000) {
|
||||
this.loginSuccess(res)
|
||||
|
||||
this.loginSuccess(res)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -233,7 +238,11 @@
|
||||
uni.switchTab({
|
||||
url: '/pages/tabbar/home/home'
|
||||
})
|
||||
}else{
|
||||
}else{
|
||||
console.log(this.loginType,'loginTypeloginTypeloginType')
|
||||
if(!this.loginType){
|
||||
this.refuseLogin()
|
||||
}
|
||||
console.log('禁摩登录i失败==================')
|
||||
}
|
||||
},
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
uni.setStorageSync('loginOut', true)
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/BagAuth/pages/login/login'
|
||||
url: '/BagAuth/pages/login/login?loginType=true'
|
||||
})
|
||||
}, 1000)
|
||||
}
|
||||
@@ -144,7 +144,7 @@
|
||||
setTimeout(() => {
|
||||
uni.setStorageSync('loginOut', true)
|
||||
uni.reLaunch({
|
||||
url: '/BagAuth/pages/login/login'
|
||||
url: '/BagAuth/pages/login/login?loginType=true'
|
||||
})
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
@@ -335,9 +335,9 @@
|
||||
content:"登录佰川加油才可以加油 |˛˙꒳˙)♡",
|
||||
confirmText:'去登陆',
|
||||
success: (res) => {
|
||||
if(res.confirm){
|
||||
if(res.confirm){
|
||||
uni.reLaunch({
|
||||
url:'../../../BagAuth/pages/login/login'
|
||||
url:'../../../BagAuth/pages/login/login?loginType=true'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,10 @@
|
||||
<block slot="content">中石化紫云路</block>
|
||||
<block slot="backText">返回</block>
|
||||
</cu-custom> -->
|
||||
<view class="bg-img fixed-top flex align-end margin-bottom-lg " :style="'background-image: url('+imgURL+'site-bg.png '+');width: 750upx;height: 326rpx;background-size:cover'">
|
||||
<image @tap="goBack" :src="imgURL+'site-back.png'" width="20upx" mode="widthFix" class="position-ab site-back">
|
||||
<view class="bg-img fixed-top flex align-end margin-bottom-lg "
|
||||
:style="'background-image: url('+imgURL+'site-bg.png '+');width: 750upx;height: 326rpx;background-size:cover'">
|
||||
<image @tap="goBack" :src="imgURL+'site-back.png'" width="20upx" mode="widthFix"
|
||||
class="position-ab site-back">
|
||||
</image>
|
||||
<view class="cu-list menu margin padding-sm radius my-shadow bg-white yu-card-xuan">
|
||||
<view class="cu-item ">
|
||||
@@ -29,8 +31,10 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg-img placeholder-hidden flex align-end margin-bottom-lg " :style="'background-image: url('+imgURL+'site-bg.png '+');width: 750upx;height: 326rpx;background-size:cover'">
|
||||
<image @tap="goBack" :src="imgURL+'site-back.png'" width="20upx" mode="widthFix" class="position-ab site-back">
|
||||
<view class="bg-img placeholder-hidden flex align-end margin-bottom-lg "
|
||||
:style="'background-image: url('+imgURL+'site-bg.png '+');width: 750upx;height: 326rpx;background-size:cover'">
|
||||
<image @tap="goBack" :src="imgURL+'site-back.png'" width="20upx" mode="widthFix"
|
||||
class="position-ab site-back">
|
||||
</image>
|
||||
<view class="flex-sub">
|
||||
<view class="cu-list menu margin padding-sm radius my-shadow bg-white yu-card-xuan">
|
||||
@@ -61,7 +65,7 @@
|
||||
</view>
|
||||
<!-- 价格 -->
|
||||
<price-tab @onChangeChannelCode="getChannelCode" @onChangePayQr="onChangePayQr" @onChangePay="onChangePay"
|
||||
:channel-list="siteInfo.oilSiteChannelDetailsVos"></price-tab>
|
||||
:channel-list="siteInfo.oilSiteChannelDetailsVos"></price-tab>
|
||||
|
||||
|
||||
<!-- 客户评价 -->
|
||||
@@ -81,20 +85,22 @@
|
||||
<view class="bg-gray padding-top-sm ">
|
||||
<view class="cu-list bg-white no-border menu padding-top ">
|
||||
<text class="padding margin-top">客户订单</text>
|
||||
<view class="cu-item " v-for="(itm,index) in siteInfo.oilSiteOrderInfoVos" :key="index">
|
||||
<view class="cu-item no-border"
|
||||
v-if="!siteInfo.oilSiteOrderInfoVos||!siteInfo.oilSiteOrderInfoVos.length">
|
||||
暂无
|
||||
</view>
|
||||
<view v-else class="cu-item " v-for="(itm,index) in siteInfo.oilSiteOrderInfoVos" :key="index">
|
||||
<text class="text-black">
|
||||
{{itm.userName|usernameF}} {{itm.plateNumber|plateNumberF}}
|
||||
</text>
|
||||
<text class=" text-black ">加 {{itm.oilsCode}} {{itm.volume}}L 节省 <text class="text-red">
|
||||
¥{{itm.discountAmount}}</text></text>
|
||||
</view>
|
||||
<view class="cu-item no-border" v-if="!siteInfo.oilSiteOrderInfoVos.length">
|
||||
暂无
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
<!-- 底部去支付 -->
|
||||
<view class="" v-if="activePay||qrcodePay">
|
||||
<view class="" >
|
||||
<view class="btn bg-white placeholder-hidden">
|
||||
<view class="flex bg-white padding flex-direction">
|
||||
<button class="cu-btn block bg-main-oil lg" v-if="activePay" @tap="makePay">
|
||||
@@ -102,7 +108,7 @@
|
||||
</image>
|
||||
一键支付
|
||||
</button>
|
||||
<!-- <button v-if="qrcodePay" class="cu-btn block bg-main-oil margin-tb-sm lg" @tap="siteQrPay">
|
||||
<!-- <button v-if="qrcodePay" class="cu-btn block bg-main-oil margin-tb-sm lg" @tap="siteQrPay">
|
||||
<image class="site-icon margin-right-sm" :src="imgURL+'site-qr.png'" mode="widthFix">
|
||||
</image>
|
||||
二维码支付
|
||||
@@ -111,7 +117,7 @@
|
||||
</view>
|
||||
<view class="btn bg-white fixed ">
|
||||
<view class="flex bg-white padding flex-direction">
|
||||
<button class="cu-btn block bg-main-oil lg" v-if="activePay" @tap="makePay">
|
||||
<button class="cu-btn block bg-main-oil lg" @tap="makePay">
|
||||
<image class="site-icon margin-right-sm" :src="imgURL+'site-yz.png'" mode="widthFix">
|
||||
</image>
|
||||
一键支付
|
||||
@@ -133,10 +139,10 @@
|
||||
<view class="">
|
||||
<image src="../../../static/img/errIcon.png" mode="" style="width:100rpx;height: 100rpx;"></image>
|
||||
</view>
|
||||
<view class="cu-bar box-panding text-centerS" >
|
||||
<text class="headShow"> 支付提醒 </text>
|
||||
<view class="cu-bar box-panding text-centerS">
|
||||
<text class="headShow"> 支付提醒 </text>
|
||||
</view>
|
||||
<view class="cu-bar box-panding" >
|
||||
<view class="cu-bar box-panding">
|
||||
<text class="showtext">当前油站距离您较远,请与加油员确认您选择的油站是否正确。</text>
|
||||
</view>
|
||||
<view class="checklocation_box_button">
|
||||
@@ -161,7 +167,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showtitle:false,
|
||||
showtitle: false,
|
||||
radio: 'B',
|
||||
mainURL: this.global.mainURL,
|
||||
imgURL: this.global.imgURL,
|
||||
@@ -184,53 +190,53 @@
|
||||
},
|
||||
onUnload() {
|
||||
console.log('这里是卸载页面')
|
||||
this.innerAudioContext.stop()
|
||||
this.innerAudioContext.stop()
|
||||
},
|
||||
onLoad(option) {
|
||||
if(!option.item){
|
||||
let siteInfos = uni.getStorageSync('siteInfo')
|
||||
var oilItem = JSON.parse(decodeURIComponent(siteInfos))
|
||||
}else{
|
||||
onLoad(option) {
|
||||
if (!option.item) {
|
||||
let siteInfos = uni.getStorageSync('siteInfo')
|
||||
var oilItem = JSON.parse(decodeURIComponent(siteInfos))
|
||||
} else {
|
||||
var oilItem = JSON.parse(decodeURIComponent(option.item))
|
||||
}
|
||||
uni.setStorageSync('oilItem',oilItem)
|
||||
this.getSiteInfo(oilItem.siteId)
|
||||
}
|
||||
uni.setStorageSync('oilItem', oilItem)
|
||||
this.getSiteInfo(oilItem.siteId, oilItem)
|
||||
this.siteId = oilItem.siteId
|
||||
if(oilItem.listTag == '万金油'){
|
||||
if (oilItem.listTag == '万金油') {
|
||||
this.audioUrl = 'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/wanjinyou.mp3'
|
||||
}else if(oilItem.listTag == '星油'){
|
||||
} else if (oilItem.listTag == '星油') {
|
||||
this.audioUrl = 'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/xingyouyunzhan.mp3'
|
||||
}else if(oilItem.listTag == '壳牌'){
|
||||
} else if (oilItem.listTag == '壳牌') {
|
||||
this.audioUrl = 'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/qiaopainew.mp3'
|
||||
}else if(oilItem.listTag == '上汽联名卡'){
|
||||
} else if (oilItem.listTag == '上汽联名卡') {
|
||||
this.audioUrl = 'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/shangqi.mp3'
|
||||
}
|
||||
this.ContextAudio(this.audioUrl)
|
||||
},
|
||||
methods: {
|
||||
// 生成音频文件
|
||||
ContextAudio(url){
|
||||
ContextAudio(url) {
|
||||
this.innerAudioContext = uni.createInnerAudioContext();
|
||||
this.innerAudioContext.autoplay = true;
|
||||
this.innerAudioContext.src = url;
|
||||
this.innerAudioContext.onPlay(() => {
|
||||
console.log('开始播放');
|
||||
console.log('开始播放');
|
||||
});
|
||||
this.innerAudioContext.onError((res) => {
|
||||
console.log(res.errMsg);
|
||||
console.log(res.errCode);
|
||||
console.log(res.errMsg);
|
||||
console.log(res.errCode);
|
||||
});
|
||||
},
|
||||
backTohome(){
|
||||
backTohome() {
|
||||
this.innerAudioContext.stop()
|
||||
uni.switchTab({
|
||||
url:'../../../pages/tabbar/home/home'
|
||||
url: '../../../pages/tabbar/home/home'
|
||||
})
|
||||
},
|
||||
hidendialog(){
|
||||
this.showtitle =false
|
||||
hidendialog() {
|
||||
this.showtitle = false
|
||||
},
|
||||
gotoPay(){
|
||||
gotoPay() {
|
||||
this.innerAudioContext.stop()
|
||||
uni.navigateTo({
|
||||
url: `/BagStation/pages/makeOrder/makeOrder?siteId=${this.siteId}&activeCur=${this.activeCur}`
|
||||
@@ -241,35 +247,65 @@
|
||||
this.secondChannelCode = sec
|
||||
},
|
||||
siteQrPay() {
|
||||
this.innerAudioContext.stop()
|
||||
this.innerAudioContext.stop()
|
||||
// let siteId =
|
||||
uni.navigateTo({
|
||||
url: `/BagStation/pages/stationDetail/stieQr?siteId=${this.siteId}&activeChannelCode=${this.activeChannelCode}&secondChannelCode=${this.secondChannelCode}`
|
||||
})
|
||||
},
|
||||
getSiteInfo(id) {
|
||||
console.log('进入获取油站信息')
|
||||
getSiteInfo(id, item) {
|
||||
console.log('进入获取油站信息');
|
||||
let user = uni.getStorageSync('user');
|
||||
let data2 = {
|
||||
...uni.getStorageSync('location'),
|
||||
siteId: id
|
||||
}
|
||||
oilSiteApi.getSiteDetails(data2).then(res => {
|
||||
console.log('进入获取油站信息getSiteDetails',res)
|
||||
if (res.code == 20000) {
|
||||
this.siteInfo = res.data
|
||||
}
|
||||
})
|
||||
if (user) {
|
||||
oilSiteApi.getSiteDetails(data2).then(res => {
|
||||
console.log('进入获取油站信息getSiteDetails', res)
|
||||
if (res.code == 20000) {
|
||||
this.siteInfo = res.data
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.siteInfo = item
|
||||
}
|
||||
|
||||
},
|
||||
makePay() {
|
||||
console.log(this.siteInfo.juli)
|
||||
if(this.siteInfo.juli > 1000 ){
|
||||
this.showtitle = true
|
||||
}else{
|
||||
this.innerAudioContext.stop()
|
||||
uni.navigateTo({
|
||||
url: `/BagStation/pages/makeOrder/makeOrder?siteId=${this.siteId}&activeCur=${this.activeCur}`
|
||||
})
|
||||
let user = uni.getStorageSync('user');
|
||||
if (this.activePay && user) {
|
||||
if (this.siteInfo.juli > 1000) {
|
||||
this.showtitle = true
|
||||
} else {
|
||||
this.innerAudioContext.stop()
|
||||
uni.navigateTo({
|
||||
url: `/BagStation/pages/makeOrder/makeOrder?siteId=${this.siteId}&activeCur=${this.activeCur}`
|
||||
})
|
||||
}
|
||||
} else {
|
||||
if(!user){
|
||||
uni.showModal({
|
||||
title: '请您登录',
|
||||
content: "登录佰川加油才可以加油 |˛˙꒳˙)♡",
|
||||
confirmText: '去登陆',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.reLaunch({
|
||||
url: '../../../BagAuth/pages/login/login?loginType=true'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}else{
|
||||
uni.showToast({
|
||||
title:'暂无可选油品',
|
||||
icon:'none'
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
onChangePayQr(val) {
|
||||
this.qrcodePay = val
|
||||
@@ -293,7 +329,7 @@
|
||||
|
||||
},
|
||||
goBack() {
|
||||
this.innerAudioContext.stop()
|
||||
this.innerAudioContext.stop()
|
||||
uni.navigateBack({
|
||||
|
||||
})
|
||||
@@ -443,69 +479,83 @@
|
||||
|
||||
.yu-card-xuan .action {
|
||||
white-space: nowrap;
|
||||
}.close-icon{
|
||||
position: absolute;
|
||||
right: 2%;
|
||||
top: 2%;
|
||||
}
|
||||
.dialog-box{
|
||||
position: relative;
|
||||
}
|
||||
.text-centerS{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
}
|
||||
.red_btn{
|
||||
color: #FFFFFF;
|
||||
background-color: #fe0505;
|
||||
}
|
||||
.box-paddings{
|
||||
padding:40rpx 0;
|
||||
}
|
||||
.headShow{
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
.showtext{
|
||||
line-height: 2;
|
||||
font-size: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
padding: 0 10%;
|
||||
word-spacing: 10px;
|
||||
letter-spacing: 3px;
|
||||
text-align: left;
|
||||
}
|
||||
.checklocation_box_button{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 5%;
|
||||
}
|
||||
.btn-box{
|
||||
width: 45%;
|
||||
flex: 0 0 auto;
|
||||
text-align: center;
|
||||
padding: 3%;
|
||||
border-radius: 20rpx;
|
||||
font-size: 28rpx;
|
||||
box-sizing: border-box;
|
||||
border: 2rpx solid #bfbfbf;
|
||||
}
|
||||
.box-panding{
|
||||
padding:10 0;
|
||||
}
|
||||
.checklocation{
|
||||
}
|
||||
|
||||
.close-icon {
|
||||
position: absolute;
|
||||
right: 2%;
|
||||
top: 2%;
|
||||
}
|
||||
|
||||
.dialog-box {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.text-centerS {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.red_btn {
|
||||
color: #FFFFFF;
|
||||
background-color: #fe0505;
|
||||
}
|
||||
|
||||
.box-paddings {
|
||||
padding: 40rpx 0;
|
||||
}
|
||||
|
||||
.headShow {
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.showtext {
|
||||
line-height: 2;
|
||||
font-size: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
padding: 0 10%;
|
||||
word-spacing: 10px;
|
||||
letter-spacing: 3px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.checklocation_box_button {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 5%;
|
||||
}
|
||||
|
||||
.btn-box {
|
||||
width: 45%;
|
||||
flex: 0 0 auto;
|
||||
text-align: center;
|
||||
padding: 3%;
|
||||
border-radius: 20rpx;
|
||||
font-size: 28rpx;
|
||||
box-sizing: border-box;
|
||||
border: 2rpx solid #bfbfbf;
|
||||
}
|
||||
|
||||
.box-panding {
|
||||
padding: 10 0;
|
||||
}
|
||||
|
||||
.checklocation {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 20%;
|
||||
right: 20%;
|
||||
z-index: 999;
|
||||
}
|
||||
.checklocation_box{
|
||||
|
||||
.checklocation_box {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.content {
|
||||
min-height: 100%;
|
||||
position: relative;
|
||||
@@ -599,4 +649,4 @@
|
||||
.yu-card-xuan .action {
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -38,6 +38,13 @@ export default {
|
||||
data: data
|
||||
})
|
||||
},
|
||||
getBCSitesByActivity(data) {
|
||||
return request({
|
||||
url: `/${service_name}/${group_name}/getBCSitesByActivity`,
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
},
|
||||
getSiteDetails(data) {
|
||||
return request({
|
||||
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",
|
||||
"pages": [{
|
||||
|
||||
@@ -59,12 +59,13 @@
|
||||
</view>
|
||||
<view class="text-xxl" @tap="toManagement">
|
||||
<view class="cuIcon-form">
|
||||
|
||||
|
||||
</view>
|
||||
<text class="text-df">
|
||||
中交风控
|
||||
</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -151,12 +152,12 @@
|
||||
<view class="my-bg padding">
|
||||
<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">
|
||||
<swiper-item @click="swiperClick(item,index)" v-for="(item,index) in swiperArray">
|
||||
<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>
|
||||
<ad unit-id="adunit-fae65289bc72095d" ad-intervals="30"></ad>
|
||||
</swiper-item> -->
|
||||
</swiper>
|
||||
<!-- <image :src="starUrl+'banner.png'" style="width: 100%;" mode="widthFix"></image> -->
|
||||
</view>
|
||||
@@ -204,9 +205,13 @@
|
||||
// src:this.global.starUrl+'banner.png',
|
||||
// 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',
|
||||
link: 'https://tengxun.hkzj168.com/?ChannelId=20220831152210221048473'
|
||||
src:'https://xoil-public.oss-cn-beijing.aliyuncs.com/baichuan_MP/banner_baichuan.png',
|
||||
JumpPage:'/Activity/pages/index/index'
|
||||
},
|
||||
],
|
||||
listHeight: 160,
|
||||
@@ -354,6 +359,7 @@
|
||||
},
|
||||
|
||||
methods: {
|
||||
toActivity(){},
|
||||
toManagement() {
|
||||
const user = uni.getStorageSync('user');
|
||||
if (user) {
|
||||
@@ -378,10 +384,15 @@
|
||||
}
|
||||
},
|
||||
swiperClick(item, index) {
|
||||
if (!item?.link) return
|
||||
uni.navigateTo({
|
||||
url: '/pages/tabbar/home/link?url=' + encodeURIComponent(JSON.stringify(item.link))
|
||||
})
|
||||
// if (!item?.link) return
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/tabbar/home/link?url=' + encodeURIComponent(JSON.stringify(item.link))
|
||||
// })
|
||||
if(item?.JumpPage){
|
||||
uni.navigateTo({
|
||||
url: item.JumpPage
|
||||
})
|
||||
}
|
||||
},
|
||||
goToPage(url) {
|
||||
if (!url) return;
|
||||
@@ -575,27 +586,32 @@
|
||||
},
|
||||
toDetail(item) {
|
||||
let itemS = encodeURIComponent(JSON.stringify(item))
|
||||
console.log(itemS)
|
||||
if (uni.getStorageSync('user')) {
|
||||
uni.navigateTo({
|
||||
url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`,
|
||||
fail: (err) => {},
|
||||
success: () => {}
|
||||
})
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '请您登录',
|
||||
content: "登录佰川加油才可以加油 |˛˙꒳˙)♡",
|
||||
confirmText: '去登陆',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.reLaunch({
|
||||
url: '../../../BagAuth/pages/login/login'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`,
|
||||
fail: (err) => {},
|
||||
success: () => {}
|
||||
})
|
||||
// console.log(itemS)
|
||||
// if (uni.getStorageSync('user')) {
|
||||
// uni.navigateTo({
|
||||
// url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`,
|
||||
// fail: (err) => {},
|
||||
// success: () => {}
|
||||
// })
|
||||
// } else {
|
||||
// uni.showModal({
|
||||
// title: '请您登录',
|
||||
// content: "登录佰川加油才可以加油 |˛˙꒳˙)♡",
|
||||
// confirmText: '去登陆',
|
||||
// success: (res) => {
|
||||
// if (res.confirm) {
|
||||
// uni.reLaunch({
|
||||
// url: '../../../BagAuth/pages/login/login?loginType=true'
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
},
|
||||
getFilterData() {
|
||||
oilSiteApi.getCheckInfo().then(res => {
|
||||
|
||||
@@ -426,31 +426,40 @@
|
||||
|
||||
},
|
||||
toDetail(item) {
|
||||
let itemS = encodeURIComponent(JSON.stringify(item))
|
||||
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'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
let itemS = encodeURIComponent(JSON.stringify(item));
|
||||
uni.navigateTo({
|
||||
url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`,
|
||||
fail: (err) => {
|
||||
// console.log(err)
|
||||
},
|
||||
success: () => {
|
||||
// console.log('err')
|
||||
}
|
||||
})
|
||||
// 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?loginType=true'
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
},
|
||||
nameSelect(value, item) {
|
||||
this.title2 = item.text
|
||||
|
||||
@@ -121,9 +121,9 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="xu-content card-menu margin margin-bottom-xs radius my-shadow">
|
||||
<!-- <view class="xu-content card-menu margin margin-bottom-xs radius my-shadow">
|
||||
<view class=" cu-list sm-border grid col-4 no-border ">
|
||||
<view class="cu-item">
|
||||
<view @click="clickFn" class="cu-item">
|
||||
<view class=" padding-tb-0">
|
||||
<view class="image-self-view">
|
||||
<img :src="starUrl+'wd-ic-1.png'" lazy-load class="png" mode="widthFix"></img>
|
||||
@@ -131,7 +131,7 @@
|
||||
</view>
|
||||
<text>红包卡券</text>
|
||||
</view>
|
||||
<view class="cu-item">
|
||||
<view @click="clickFn" class="cu-item">
|
||||
<view class=" padding-tb-0">
|
||||
<view class="image-self-view">
|
||||
<img :src="starUrl+'wd-ic-2.png'" lazy-load class="png" mode="widthFix"></img>
|
||||
@@ -139,7 +139,7 @@
|
||||
</view>
|
||||
<text>活动通知</text>
|
||||
</view>
|
||||
<view class="cu-item">
|
||||
<view @click="clickFn" class="cu-item">
|
||||
<view class=" padding-tb-0">
|
||||
<view class="image-self-view">
|
||||
<img :src="starUrl+'wd-ic-3.png'" lazy-load class="png" mode="widthFix"></img>
|
||||
@@ -147,7 +147,7 @@
|
||||
</view>
|
||||
<text>推荐有礼</text>
|
||||
</view>
|
||||
<view class="cu-item" @tap="goToPage('/BagAuth/pages/agreeMent/OperationGuide')">
|
||||
<view class="cu-item" @tap="goToPage('/BagAuth/pages/agreeMent/OperationGuide')">
|
||||
<view class=" padding-tb-0">
|
||||
<view class="image-self-view">
|
||||
<img :src="starUrl+'wd-ic-4.png'" lazy-load class="png" mode="widthFix"></img>
|
||||
@@ -156,7 +156,7 @@
|
||||
<text>操作说明</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="xu-content padding-sm">
|
||||
<view class="cu-list menu">
|
||||
<view class="cu-item hidden-cu-item">
|
||||
@@ -173,12 +173,12 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="cu-item arrow">
|
||||
<!-- <view @click="clickFn" class="cu-item arrow">
|
||||
<view class="content">
|
||||
<image :src="starUrl+'gywm.png'" class="png" mode="aspectFit"></image>
|
||||
<text class="text-grey padding-left-sm">关于我们</text>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -207,7 +207,21 @@
|
||||
this.getAmount()
|
||||
},
|
||||
methods: {
|
||||
clickFn(e){
|
||||
uni.showToast({
|
||||
title:'功能正在开发中',
|
||||
icon:'none'
|
||||
})
|
||||
},
|
||||
goToPage(url) {
|
||||
const token = uni.getStorageSync('Authorization')
|
||||
if(!token){
|
||||
uni.showToast({
|
||||
title:'功能正在开发中',
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!url) return;
|
||||
uni.navigateTo({
|
||||
url
|
||||
@@ -228,7 +242,7 @@
|
||||
this.routerTo('/BagSetup/setup/setup')
|
||||
}else{
|
||||
uni.reLaunch({
|
||||
url:'../../../BagAuth/pages/login/login'
|
||||
url:'../../../BagAuth/pages/login/login?loginType=true'
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -4,7 +4,7 @@ import utils from '@/utils/encode'
|
||||
// const env = process.env.NODE_ENV
|
||||
const env = 'production'/* */
|
||||
// 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 = 'https://www.xingoil.com/adminapi' // 生产,加密 new
|
||||
@@ -90,7 +90,7 @@ service.interceptors.response.use(
|
||||
|
||||
uni.hideLoading()
|
||||
if(response.config.url.indexOf('/oil-site/oilSiteOrderInfo/getOrderQrCode') === -1){
|
||||
if (res.code != 20000 && res.msg != '令牌为空,不允许操作' && res.msg != '您的ip已经更改,请重新登录' && res.msg != '登录与操作设备不同') {
|
||||
if (res.code != 20000 && res.msg != '令牌为空,不允许操作' && res.msg != '您的ip已经更改,请重新登录' && res.msg != '登录与操作设备不同' && res.msg != '用户未登录只可查询前两页油站信息') {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none"
|
||||
|
||||
Reference in New Issue
Block a user