Compare commits
20 Commits
d92d2d2e61
...
xiaozy1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
afd4e3b501 | ||
| 50feac9fe5 | |||
|
|
2bd0a3b42e | ||
| 1d314caefd | |||
|
|
df9a5efa50 | ||
| 1abc07930f | |||
|
|
5c9a65fdcb | ||
| ec08020202 | |||
|
|
c2d90eed8c | ||
|
|
4fb1d03356 | ||
|
|
cb276d7bef | ||
|
|
5876735edc | ||
|
|
cf9907998d | ||
|
|
83d7ade43b | ||
|
|
c943ba57c0 | ||
|
|
df5a31f55a | ||
|
|
604e9b3bb6 | ||
|
|
da9ffdb20d | ||
| 99cfd70593 | |||
|
|
5a6193c34f |
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>
|
||||
51
App.vue
51
App.vue
@@ -58,7 +58,9 @@
|
||||
let custom = wx.getMenuButtonBoundingClientRect();
|
||||
Vue.prototype.Custom = custom;
|
||||
Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
|
||||
// #endif // #ifdef MP-ALIPAY
|
||||
// #endif
|
||||
|
||||
// #ifdef MP-ALIPAY
|
||||
Vue.prototype.StatusBar = e.statusBarHeight;
|
||||
Vue.prototype.CustomBar = e.statusBarHeight + e.titleBarHeight;
|
||||
// #endif
|
||||
@@ -130,10 +132,27 @@
|
||||
if (view.route != 'pages/index/startPage/startPage' && view.route.indexOf('BagAuth') == -1) {
|
||||
const token = uni.getStorageSync('Authorization')
|
||||
const openid = uni.getStorageSync('openid')
|
||||
|
||||
let jumpUrl = '/BagAuth/pages/login/login'
|
||||
let urlTarget = this.obtainUrlPathParameterTarget(view.$page.fullPath)
|
||||
console.log('urlTarget',urlTarget)
|
||||
let target = {}
|
||||
if(urlTarget.q) {
|
||||
let originLink = decodeURIComponent(decodeURIComponent(urlTarget.q))
|
||||
target = this.obtainUrlPathParameterTarget(originLink)
|
||||
target.siteId && (jumpUrl += `?scanningParams=${decodeURIComponent(urlTarget.q)}`)
|
||||
}
|
||||
// console.log('jumpUrl',jumpUrl)
|
||||
if (token && openid) {
|
||||
if(!white.includes(view.route)){
|
||||
this.getAmount()
|
||||
}
|
||||
this.getAmount()
|
||||
// if(!white.includes(view.route) ){
|
||||
// this.getAmount()
|
||||
// }
|
||||
|
||||
// if(target.siteId || !white.includes(view.route) ){
|
||||
// this.getAmount()
|
||||
// }
|
||||
|
||||
onlineTimer = setTimeout(() => {
|
||||
if (this.loginStatus == 'offline') {
|
||||
uni.clearStorageSync()
|
||||
@@ -144,7 +163,7 @@
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
uni.redirectTo({
|
||||
url: '/BagAuth/pages/login/login'
|
||||
url: jumpUrl
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -160,6 +179,9 @@
|
||||
}, 500)
|
||||
|
||||
} else {
|
||||
target.siteId && uni.redirectTo({
|
||||
url: jumpUrl
|
||||
})
|
||||
// loginTimer = setTimeout(() => {
|
||||
// uni.showModal({
|
||||
// title: '请您登录',
|
||||
@@ -181,10 +203,26 @@
|
||||
// }
|
||||
})
|
||||
},
|
||||
|
||||
obtainUrlPathParameterTarget(url) {
|
||||
let target = {}
|
||||
if(url.includes('?')) {
|
||||
let paramsText = url.split("?")[1]
|
||||
let paramsArr = paramsText.split("&")
|
||||
paramsArr.forEach(item => {
|
||||
target[item.split('=')[0]] = item.split('=')[1]
|
||||
})
|
||||
}
|
||||
console.log('11target',target)
|
||||
return target
|
||||
},
|
||||
|
||||
// 是否token过期或ip更改
|
||||
getAmount() {
|
||||
getAmount() {
|
||||
clearTimeout(loginTimer)
|
||||
accountApi.getTotalOilCardInfo().then(res => {
|
||||
console.log('res.code',res.code)
|
||||
console.log(555)
|
||||
if (res.code == 20000) {
|
||||
this.loginStatus = 'online'
|
||||
} else if (res.code == 42011) {
|
||||
@@ -200,6 +238,7 @@
|
||||
},
|
||||
|
||||
onShow: function() {
|
||||
console.log(12388)
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
success: function(res) {
|
||||
|
||||
@@ -152,22 +152,24 @@
|
||||
loginRes: {},
|
||||
sessionKey: '',
|
||||
nickName: '',
|
||||
loginOut: uni.getStorageSync('loginOut') ? true : false
|
||||
loginOut: uni.getStorageSync('loginOut') ? true : false,
|
||||
scanningParams:null
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
onLoad(options) {
|
||||
uni.clearStorageSync()
|
||||
this.refreshLocation()
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (loginRes) => {
|
||||
console.log(loginRes,'loginRes')
|
||||
const code = loginRes.code
|
||||
this.onceCode = code
|
||||
console.log(this.onceCode,'----------')
|
||||
oilIdentityApi.sendCode(this.onceCode).then(res => {
|
||||
console.log(res,'sendCode')
|
||||
if (res.code === 20000) {
|
||||
if(options.scanningParams) {
|
||||
// 用于扫码进入油站详情页面
|
||||
this.scanningParams = options.scanningParams
|
||||
}
|
||||
this.sessionKey = res.data.sessionKey
|
||||
uni.setStorageSync('openid', res.data.openId)
|
||||
uni.setStorageSync('unionid', res.data.unionId)
|
||||
@@ -184,7 +186,6 @@
|
||||
}
|
||||
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
uni.reLaunch({
|
||||
url: '/BagAuth/pages/login/boforeLogin/boforeLogin',
|
||||
fail: (err) => {
|
||||
@@ -224,14 +225,13 @@
|
||||
},
|
||||
refuseEmpower() {
|
||||
uni.navigateTo({
|
||||
url: '/BagAuth/pages/login/oldLogin'
|
||||
url: `/BagAuth/pages/login/oldLogin?scanningParams=${this.scanningParams}`
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
|
||||
decryptPhoneNumber(e) {
|
||||
// console.log(e.detail)
|
||||
if (e.detail.errMsg === 'getPhoneNumber:ok') {
|
||||
const data1 = {
|
||||
...e.detail,
|
||||
@@ -251,7 +251,6 @@
|
||||
bindLoginByPhone(data, url) {
|
||||
if (this.count < 1) {
|
||||
oilIdentityApi.bindLoginByPhone(data, url).then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 20000) {
|
||||
this.loginSuccess(res)
|
||||
|
||||
@@ -278,10 +277,15 @@
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
complete: (err) => {
|
||||
// console.log(err)
|
||||
}
|
||||
})
|
||||
}, 1000);
|
||||
if(this.scanningParams) {
|
||||
uni.redirectTo({
|
||||
url: `/BagStation/pages/stationDetail/stationDetail?q=${this.scanningParams}`
|
||||
})
|
||||
return
|
||||
}
|
||||
// 这里有问题
|
||||
uni.switchTab({
|
||||
url: '/pages/tabbar/home/home'
|
||||
|
||||
@@ -171,7 +171,14 @@
|
||||
count: 0,
|
||||
loginRes: {},
|
||||
checked: false,
|
||||
next: false
|
||||
next: false,
|
||||
scanningParams:null
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if(options.scanningParams) {
|
||||
// 用于扫码进入油站详情页面
|
||||
this.scanningParams = options.scanningParams
|
||||
}
|
||||
},
|
||||
onShow() {},
|
||||
@@ -402,6 +409,12 @@
|
||||
icon: 'none'
|
||||
})
|
||||
}, 1000);
|
||||
if(this.scanningParams) {
|
||||
uni.redirectTo({
|
||||
url: `/BagStation/pages/stationDetail/stationDetail?q=${this.scanningParams}`
|
||||
})
|
||||
return
|
||||
}
|
||||
// 这里有问题
|
||||
uni.switchTab({
|
||||
url: '/pages/tabbar/home/home'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view @tap.stop='showMiniBtn = false' >
|
||||
<view @tap.stop='showMiniBtn = false'>
|
||||
<cu-custom class="main-totextbar bg-main-oil" :isBack="true" bgColor="bg-main-oil">
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">订单支付结果</block>
|
||||
@@ -13,14 +13,15 @@
|
||||
<view class="qr-container ">
|
||||
<view class="qrimg">
|
||||
<view class="qrimg" @tap="newQrString">
|
||||
<tki-qrcode ref="qrcode" cid="2" loadMake :val="val" :size="250" unit="upx"
|
||||
background="#fff" foreground="#000" pdground="#000" :icon="iconUrl" iconSize="40" onval
|
||||
:usingComponents="usingComponents" showLoading />
|
||||
<tki-qrcode ref="qrcode" cid="2" loadMake :val="val" :size="250" unit="upx" background="#fff"
|
||||
foreground="#000" pdground="#000" :icon="iconUrl" iconSize="40" onval
|
||||
:usingComponents="usingComponents" showLoading />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-center text-sm justify-center align-center flex">
|
||||
<image src="../static/img/YDJY.png" mode="" style="width: 60upx;height:60upx;" class="margin-right-sm"></image>
|
||||
<image src="../static/img/YDJY.png" mode="" style="width: 60upx;height:60upx;" class="margin-right-sm">
|
||||
</image>
|
||||
<text>壳牌</text>
|
||||
</view>
|
||||
<view class="text-center padding-top text-sm margin-bottom">
|
||||
@@ -38,12 +39,13 @@
|
||||
<view class="padding-bottom-xs margin-bottom-xs dashed-bottom">
|
||||
<view class="padding-tb-xs text-left" @tap="onCopy(order.orderSerialNumber)">
|
||||
订单编号:
|
||||
<text class="fr">{{order.orderSerialNumber?order.orderSerialNumber:''}} <text class="cuIcon-copy padding-left-xs"></text></text>
|
||||
<text class="fr">{{order.orderSerialNumber?order.orderSerialNumber:''}} <text
|
||||
class="cuIcon-copy padding-left-xs"></text></text>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-list menu solid-bottom">
|
||||
<view class="cu-item arrow" @tap="toDetail(order)">
|
||||
<view class="cu-item " :class="order.zpDisable === 'DISABLE' ? '' :'arrow'" @tap="toDetail(order)">
|
||||
油站:
|
||||
<text class="fr">{{order.siteName?order.siteName:''}}</text>
|
||||
</view>
|
||||
@@ -87,7 +89,8 @@
|
||||
</view>
|
||||
<view class="padding-tb-xs text-left">
|
||||
星油优惠:
|
||||
<text class="text-red fr">{{order.xoilDiscountAmount>0?order.xoilDiscountAmount:'xxx.x'|moneyFormat}}</text>
|
||||
<text
|
||||
class="text-red fr">{{order.xoilDiscountAmount>0?order.xoilDiscountAmount:'xxx.x'|moneyFormat}}</text>
|
||||
</view>
|
||||
<view class="padding-tb-xs text-left">
|
||||
优惠券:
|
||||
@@ -96,12 +99,13 @@
|
||||
|
||||
<view class="padding-tb-xs text-left">
|
||||
合计:
|
||||
<text class="text-red text-bold text-lg fr">{{order.payRealAmount>0?order.payRealAmount:'xxx.x' }}</text>
|
||||
<text
|
||||
class="text-red text-bold text-lg fr">{{order.payRealAmount>0?order.payRealAmount:'xxx.x' }}</text>
|
||||
</view>
|
||||
<view class="padding-tb-xs text-left">
|
||||
支付方式:
|
||||
<text class=" fr" v-if='order.orderSource == "SXF_WECHAT_MINIAPPS" '>随行付支付</text>
|
||||
|
||||
|
||||
<text class=" fr" v-else>{{order.payAccountType==0?'个人账户支付':'企业账户支付'}}</text>
|
||||
</view>
|
||||
<view class="padding-tb-xs text-left">
|
||||
@@ -128,28 +132,31 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="padding-md padding-right padding-left-xl text-right position-re" @tap.stop="showMiniBtn=true"
|
||||
<view class="padding-md padding-right padding-left-xl text-right position-re" @tap.stop="showMiniBtn=true"
|
||||
v-if="order.orderStatus == 1 ">
|
||||
<view class="radius shadow mini-btn bg-white padding-xs flex-wrap position-ab ab-rihgt-bootm"
|
||||
v-if="showMiniBtn">
|
||||
v-if="showMiniBtn">
|
||||
<!-- <view class="margin-bottom-sm ">
|
||||
<button class="cu-btn nowrap bg-white" @tap="deleteOrder(item.orderSerialNumber)">删除</button>
|
||||
</view> -->
|
||||
<!-- <view class=" ">
|
||||
<button class="cu-btn nowrap " @tap="showMiniBtn=false">收起</button>
|
||||
</view> -->
|
||||
<view class="margin-bottom-sm">
|
||||
<button class="cu-btn nowrap bg-white" @tap="gotoInvoicing()">查看开票信息</button>
|
||||
<view class="more-frame">
|
||||
<button class="more-item nowrap bg-white " @tap="goDiscount()">优惠油站</button>
|
||||
<button class="more-item nowrap bg-white " @tap="toRiskControl()">中交风控</button>
|
||||
<button class="more-item nowrap bg-white " @tap="gotoInvoicing()">查看开票信息</button>
|
||||
</view>
|
||||
</view>
|
||||
<text class="text-lg">更多</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="padding bg-white fixed-bottom">
|
||||
<view class="flex margin-bottom" v-if="order.orderStatus==0">
|
||||
<button class="cu-btn block flex-sub lg bg-main-oil " @tap="makePay">立即支付</button>
|
||||
<button class="cu-btn block flex-sub lg margin-left" @tap="cancelOrder">取消订单</button>
|
||||
</view>
|
||||
<button class=" cu-btn bg-white oil-main-color block flex-sub lg " open-type="contact"><text class="cuIcon-service padding-right-sm"></text>
|
||||
<button class=" cu-btn bg-white oil-main-color block flex-sub lg " open-type="contact"><text
|
||||
class="cuIcon-service padding-right-sm"></text>
|
||||
在线客服</button>
|
||||
<!-- <button class="cu-btn block lg margin-top " @tap="delOrder">删除订单</button> -->
|
||||
</view>
|
||||
@@ -158,7 +165,8 @@
|
||||
<button class="cu-btn block flex-sub lg bg-main-oil " @tap="makePay">立即支付</button>
|
||||
<button class="cu-btn block flex-sub lg margin-left" @tap="cancelOrder">取消订单</button>
|
||||
</view>
|
||||
<button class=" cu-btn bg-white oil-main-color block flex-sub lg " open-type="contact"><text class="cuIcon-service padding-right-sm"></text>
|
||||
<button class=" cu-btn bg-white oil-main-color block flex-sub lg " open-type="contact"><text
|
||||
class="cuIcon-service padding-right-sm"></text>
|
||||
在线客服</button>
|
||||
<!-- <button class="cu-btn block lg margin-top " @tap="delOrder">删除订单</button> -->
|
||||
</view>
|
||||
@@ -172,6 +180,7 @@
|
||||
import oilSiteApi from '@/api/oil-site.js'
|
||||
import tkiQrcode from "../pages/components/tki-qrcode/tki-qrcode.vue" //二维码生成器
|
||||
import financelApi from '@/api/oil-finance.js'
|
||||
import Financial from '@/api/Financial.js'
|
||||
export default {
|
||||
components: {
|
||||
ThirdPartyVoucher,
|
||||
@@ -180,8 +189,8 @@
|
||||
data() {
|
||||
return {
|
||||
showMiniBtn: false,
|
||||
showQr:false,
|
||||
val:'',
|
||||
showQr: false,
|
||||
val: '',
|
||||
showThirdResult: false,
|
||||
id: '',
|
||||
order: {},
|
||||
@@ -212,31 +221,54 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
showMiniBtn:function(){
|
||||
watch: {
|
||||
showMiniBtn: function() {
|
||||
// setTimeout(()=>{
|
||||
// this.showMiniBtn = false
|
||||
// },1000)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goDiscount() {
|
||||
uni.navigateTo({
|
||||
url: '/Activity/pages/index/index'
|
||||
})
|
||||
},
|
||||
toRiskControl() {
|
||||
const user = uni.getStorageSync('user');
|
||||
if (user) {
|
||||
Financial.findHomePageReport({
|
||||
customerId: user.id
|
||||
}).then(res => {
|
||||
if (res.data) {
|
||||
uni.navigateTo({
|
||||
url: `/Financial/pages/estimate/index?data=${encodeURIComponent(JSON.stringify(res.data))}`
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/Financial/pages/index?guide=1'
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
newQrString() {
|
||||
this.getOrderQrCode()
|
||||
},
|
||||
getOrderQrCode(){
|
||||
oilSiteApi.getOrderQrCode(this.order.orderSerialNumber).then( (res)=>{
|
||||
getOrderQrCode() {
|
||||
oilSiteApi.getOrderQrCode(this.order.orderSerialNumber).then((res) => {
|
||||
console.log(res)
|
||||
this.val = res.data
|
||||
if(res.code == 40000){
|
||||
this.showQr = false
|
||||
}else if(res.code == 20000){
|
||||
if (res.code == 40000) {
|
||||
this.showQr = false
|
||||
} else if (res.code == 20000) {
|
||||
this.showQr = true
|
||||
this.val =res.data.codeStr
|
||||
this.val = res.data.codeStr
|
||||
}
|
||||
} )
|
||||
})
|
||||
},
|
||||
gotoInvoicing() { //前往开票
|
||||
console.log(this.order,'+++++++++++++')
|
||||
console.log(this.order, '+++++++++++++')
|
||||
financelApi.checkStatus(this.order.orderSerialNumber).then((res) => {
|
||||
console.log('这里是check是否开发票')
|
||||
console.log(res)
|
||||
@@ -250,7 +282,8 @@
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/BagStation/orderInvoicing/orderInvoicing?orderId=' + this.order
|
||||
.orderSerialNumber + '&&customerId=' + this.order.customerId + '&&payRealAmount=' + this.order.payRealAmount +
|
||||
.orderSerialNumber + '&&customerId=' + this.order.customerId +
|
||||
'&&payRealAmount=' + this.order.payRealAmount +
|
||||
'&&realAmount=' + this.order.realAmount + '&&code=' + 1
|
||||
})
|
||||
}
|
||||
@@ -285,7 +318,7 @@
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
|
||||
|
||||
// 三方支付结果弹窗结束
|
||||
onCopy(id) {
|
||||
uni.setClipboardData({
|
||||
@@ -303,7 +336,7 @@
|
||||
if (res.code == 20000) {
|
||||
this.order = res.data
|
||||
uni.setStorageSync('oilItem', res.data)
|
||||
this.getOrderQrCode()
|
||||
this.getOrderQrCode()
|
||||
if (res.data.payMethod == 2) {
|
||||
this.tyPayMethod = res.data.payMethod
|
||||
// this.queryOrderStatusSq()
|
||||
@@ -311,11 +344,12 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
toDetail(item) {
|
||||
var itemS = JSON.stringify(item)
|
||||
uni.setStorageSync('siteInfo',itemS)
|
||||
uni.navigateTo({
|
||||
url: `/BagStation/pages/stationDetail/stationDetail`,
|
||||
toDetail(item) {
|
||||
if (item.zpDisable === 'DISABLE') return
|
||||
var itemS = JSON.stringify(item)
|
||||
uni.setStorageSync('siteInfo', itemS)
|
||||
uni.navigateTo({
|
||||
url: `/BagStation/pages/stationDetail/stationDetail`,
|
||||
fail: (err) => {
|
||||
// console.log(err)
|
||||
},
|
||||
@@ -325,6 +359,7 @@
|
||||
})
|
||||
},
|
||||
cancelOrder() {
|
||||
|
||||
orderApi.cancelOrder(this.id).then(res => {
|
||||
if (res.code == 20000) {
|
||||
uni.showToast({
|
||||
@@ -367,7 +402,7 @@
|
||||
}
|
||||
|
||||
},
|
||||
onLoad(option) {
|
||||
onLoad(option) {
|
||||
this.id = option.id
|
||||
this.getOrderInfo()
|
||||
uni.showShareMenu()
|
||||
@@ -381,7 +416,7 @@
|
||||
moneyFormat(value) {
|
||||
if (value != 'xxx.x') {
|
||||
console.log(value)
|
||||
return (parseInt(value * 100) / 100).toFixed(2)
|
||||
return (parseInt(value * 100) / 100).toFixed(2)
|
||||
} else {
|
||||
return value
|
||||
}
|
||||
@@ -405,9 +440,9 @@
|
||||
}
|
||||
},
|
||||
moneyFormath(value) {
|
||||
console.log(value)
|
||||
if (value != 'xxx.x') {
|
||||
let number = parseFloat(value).toFixed(2)
|
||||
console.log(value)
|
||||
if (value != 'xxx.x') {
|
||||
let number = parseFloat(value).toFixed(2)
|
||||
return number
|
||||
} else {
|
||||
return value
|
||||
@@ -449,19 +484,41 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>.move-tops{
|
||||
transform: translateY(-17px);
|
||||
}
|
||||
.bg-blue{
|
||||
background-color: red;
|
||||
}
|
||||
.text-centers {
|
||||
text-align: center;
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
border-radius: 7px;
|
||||
overflow: hidden;
|
||||
}
|
||||
<style scoped lang="scss">
|
||||
.more-frame {
|
||||
height: 158rpx;
|
||||
overflow-y: auto;
|
||||
|
||||
.more-item {
|
||||
margin: 10rpx 0;
|
||||
padding: 0 30rpx;
|
||||
font-size: 28rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
text-align: center;
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.move-tops {
|
||||
transform: translateY(-17px);
|
||||
}
|
||||
|
||||
.bg-blue {
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
.text-centers {
|
||||
text-align: center;
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
border-radius: 7px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.move-top {
|
||||
margin-top: -2rem;
|
||||
}
|
||||
@@ -470,6 +527,7 @@
|
||||
right: 110upx;
|
||||
bottom: 10upx;
|
||||
}
|
||||
|
||||
.move-top {
|
||||
margin-top: -2rem;
|
||||
}
|
||||
|
||||
@@ -32,6 +32,11 @@
|
||||
<view class="padding-top-sm">
|
||||
<text class="cu-tag line-yellow margin-right-xs" v-for="(itemy,index) in tagList" :key="index">{{itemy}}</text>
|
||||
</view>
|
||||
<view class="activity" v-if="siteInfo.activitySwitch">
|
||||
<view class="content">
|
||||
{{siteInfo.activityContent}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -43,6 +48,12 @@
|
||||
channelList: {
|
||||
type: Array,
|
||||
default () {}
|
||||
},
|
||||
siteInfo:{
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -128,7 +139,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style scoped lang="scss">
|
||||
.site-icon {
|
||||
width: 2rem;
|
||||
vertical-align: middle;
|
||||
@@ -137,4 +148,18 @@
|
||||
.my-tag {
|
||||
padding: 0 12rpx;
|
||||
}
|
||||
.activity {
|
||||
margin-top: 15rpx;
|
||||
display: flex;
|
||||
width: 45%;
|
||||
border:2rpx solid #1890FF50;
|
||||
// border-radius: 10rpx;
|
||||
.content {
|
||||
flex: 1;
|
||||
padding: 10rpx 20rpx;
|
||||
line-height: 36rpx;
|
||||
// min-height: 80rpx;
|
||||
color: #1890FF;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
</view>
|
||||
<!-- 价格 -->
|
||||
<price-tab @onChangeChannelCode="getChannelCode" @onChangePayQr="onChangePayQr" @onChangePay="onChangePay"
|
||||
:channel-list="siteInfo.oilSiteChannelDetailsVos"></price-tab>
|
||||
:channel-list="siteInfo.oilSiteChannelDetailsVos" :siteInfo="siteInfo"></price-tab>
|
||||
|
||||
|
||||
<!-- 客户评价 -->
|
||||
@@ -88,7 +88,7 @@
|
||||
<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 class="cu-item no-border" v-if="siteInfo.oilSiteOrderInfoVos && !siteInfo.oilSiteOrderInfoVos.length">
|
||||
暂无
|
||||
</view>
|
||||
|
||||
@@ -180,20 +180,41 @@
|
||||
}
|
||||
},
|
||||
onHide() {
|
||||
console.log('这里是hiden')
|
||||
this.innerAudioContext.stop()
|
||||
this.innerAudioContext && this.innerAudioContext.stop()
|
||||
},
|
||||
onUnload() {
|
||||
console.log('这里是卸载页面')
|
||||
this.innerAudioContext.stop()
|
||||
this.innerAudioContext && this.innerAudioContext.stop()
|
||||
},
|
||||
|
||||
|
||||
onLoad(option) {
|
||||
// console.log('option',option)
|
||||
// let userInfo = uni.getStorageSync('user')
|
||||
// if(!userInfo && option.q) {
|
||||
// uni.redirectTo({
|
||||
// url: `/BagAuth/pages/login/login?scanningParams=${option.q}`
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
|
||||
if(option.q) {
|
||||
let originLink = decodeURIComponent(option.q)
|
||||
let target = this.obtainUrlPathParameterTarget(originLink)
|
||||
console.log('target',target)
|
||||
if(target.siteId) {
|
||||
this.siteId = target.siteId
|
||||
this.getSiteInfo(target.siteId)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
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)
|
||||
this.siteId = oilItem.siteId
|
||||
@@ -209,6 +230,17 @@
|
||||
this.ContextAudio(this.audioUrl)
|
||||
},
|
||||
methods: {
|
||||
obtainUrlPathParameterTarget(url) {
|
||||
let target = {}
|
||||
if(url.includes('?')) {
|
||||
let paramsText = url.split("?")[1]
|
||||
let paramsArr = paramsText.split("&")
|
||||
paramsArr.forEach(item => {
|
||||
target[item.split('=')[0]] = item.split('=')[1]
|
||||
})
|
||||
}
|
||||
return target
|
||||
},
|
||||
// 生成音频文件
|
||||
ContextAudio(url){
|
||||
this.innerAudioContext = uni.createInnerAudioContext();
|
||||
@@ -218,12 +250,11 @@
|
||||
console.log('开始播放');
|
||||
});
|
||||
this.innerAudioContext.onError((res) => {
|
||||
console.log(res.errMsg);
|
||||
console.log(res.errCode);
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
backTohome(){
|
||||
this.innerAudioContext.stop()
|
||||
this.innerAudioContext && this.innerAudioContext.stop()
|
||||
uni.switchTab({
|
||||
url:'../../../pages/tabbar/home/home'
|
||||
})
|
||||
@@ -232,7 +263,7 @@
|
||||
this.showtitle =false
|
||||
},
|
||||
gotoPay(){
|
||||
this.innerAudioContext.stop()
|
||||
this.innerAudioContext && this.innerAudioContext.stop()
|
||||
uni.navigateTo({
|
||||
url: `/BagStation/pages/makeOrder/makeOrder?siteId=${this.siteId}&activeCur=${this.activeCur}`
|
||||
})
|
||||
@@ -242,32 +273,28 @@
|
||||
this.secondChannelCode = sec
|
||||
},
|
||||
siteQrPay() {
|
||||
this.innerAudioContext.stop()
|
||||
// let siteId =
|
||||
this.innerAudioContext && this.innerAudioContext.stop()
|
||||
uni.navigateTo({
|
||||
url: `/BagStation/pages/stationDetail/stieQr?siteId=${this.siteId}&activeChannelCode=${this.activeChannelCode}&secondChannelCode=${this.secondChannelCode}`
|
||||
})
|
||||
},
|
||||
getSiteInfo(id) {
|
||||
console.log('进入获取油站信息')
|
||||
let data2 = {
|
||||
...uni.getStorageSync('location'),
|
||||
siteId: id,
|
||||
clientBelong: "ZHONGPIN"
|
||||
}
|
||||
oilSiteApi.getSiteDetails(data2).then(res => {
|
||||
console.log('进入获取油站信息getSiteDetails',res)
|
||||
oilSiteApi.getSiteDetails(data2).then(res => {
|
||||
if (res.code == 20000) {
|
||||
this.siteInfo = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
makePay() {
|
||||
console.log(this.siteInfo.juli)
|
||||
if(this.siteInfo.juli > 1000 ){
|
||||
this.showtitle = true
|
||||
}else{
|
||||
this.innerAudioContext.stop()
|
||||
this.innerAudioContext && this.innerAudioContext.stop()
|
||||
uni.navigateTo({
|
||||
url: `/BagStation/pages/makeOrder/makeOrder?siteId=${this.siteId}&activeCur=${this.activeCur}`
|
||||
})
|
||||
@@ -295,10 +322,11 @@
|
||||
|
||||
},
|
||||
goBack() {
|
||||
this.innerAudioContext.stop()
|
||||
uni.navigateBack({
|
||||
// this.innerAudioContext.stop()
|
||||
|
||||
})
|
||||
uni.switchTab({
|
||||
url: '/pages/tabbar/home/home'
|
||||
});
|
||||
},
|
||||
selectRadio() {
|
||||
this.radio === 'A' ? this.radio = '' : this.radio = 'A'
|
||||
|
||||
@@ -31,6 +31,13 @@ export default {
|
||||
data: data
|
||||
})
|
||||
},
|
||||
getBSitesByActivity(data) {
|
||||
return request({
|
||||
url: `/${service_name}/${group_name}/getBCSitesByActivity`,
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
},
|
||||
getSiteLists(data) {
|
||||
return request({
|
||||
url: `/${service_name}/${group_name}/findBCSiteInfoByPage`,
|
||||
|
||||
@@ -1,25 +1,34 @@
|
||||
<template>
|
||||
<view class="cu-item cur padding no-mr-border site-item" :style="{height:siteItem.oilProductCodeAndPrices.length>3?'220rpx !important':listHeight?listHeight + 'rpx !important':''}">
|
||||
<view class="cu-avatar radius lg "
|
||||
:style="'background-image:url('+(siteItem.siteImages?siteItem.siteImages:defaultLogo)+');'">
|
||||
</view>
|
||||
<view class="content">
|
||||
<!-- :style="{height:siteItem.oilProductCodeAndPrices && siteItem.oilProductCodeAndPrices.length>3?'220rpx !important':listHeight?listHeight + 'rpx !important':''}" -->
|
||||
<view class="site-item">
|
||||
<view class="radius"
|
||||
:style="'background-image:url('+(siteItem.siteImages?siteItem.siteImages:defaultLogo)+');'">
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="action">
|
||||
<view class="text-grey text-sm " style="padding-top: 6rpx;">
|
||||
<!-- <my-icon iconName="sy-der-icon.png" class="padding-right-xs text-sm"></my-icon> -->
|
||||
{{siteItem.juli|distanceFilter}}
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="text-cut text-black text-lg padding-right-sm ">{{siteItem.siteName}}</view>
|
||||
<view class="text-cut text-black text-lg padding-right-sm ">{{siteItem.siteName}}</view>
|
||||
</view>
|
||||
<view class="listTages">
|
||||
<!-- <view v-if="siteItem.siteLevel" class=" cu-tag round bg-self--dark-yellow yu-tag text-xs">{{siteItem.siteLevel}}级</view> -->
|
||||
<view class="cu-tag round bg-self-yellow yu-tag text-xs" :class="siteItem.channelCode=='XOIL'?'tag-red':''">{{siteItem.listTag|channelCodeFamt}}
|
||||
<view class="cu-tag round bg-self-yellow yu-tag text-xs"
|
||||
:class="siteItem.channelCode=='XOIL'?'tag-red':''">{{siteItem.listTag|channelCodeFamt}}
|
||||
</view>
|
||||
<view class="cu-tag round bg-self--dark-yellow yu-tag text-xs" v-show="first">距离最近</view>
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="text-cut color-666 text-sm ">
|
||||
{{siteItem.address}}
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="text-cut color-666 text-sm ">
|
||||
{{siteItem.address}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-gray flex" style="width: calc(100% + 30%);display: flex;flex-wrap: wrap;">
|
||||
<view v-if="listHeight" class="youpin" style="" v-for="(item,index) in siteItem.oilProductCodeAndPrices">
|
||||
<view class="text-gray flex" style="display: flex;flex-wrap: wrap;">
|
||||
<view v-if="listHeight" class="youpin" style=""
|
||||
v-for="(item,index) in siteItem.oilProductCodeAndPrices">
|
||||
<view class="text-bold oil-main-color text-xl padding-right-xs">
|
||||
{{item.oilProductCode}}
|
||||
</view>
|
||||
@@ -36,25 +45,24 @@
|
||||
<view v-if="!listHeight" class="">
|
||||
<text class="cu-tag oil-tag radius text-xs"
|
||||
v-if="siteItem.oilSitePrice - siteItem.sitePrice>0">省¥{{(siteItem.oilSitePrice - siteItem.sitePrice)|moneyFormat}}</text>
|
||||
</view>
|
||||
<view v-if="!listHeight" class="text-cut padding-left-sm text-lg">
|
||||
<text class="text-delete color-333 text-sm padding-right-xs">
|
||||
¥{{siteItem.oilSitePrice|moneyFormat}}/L
|
||||
</text>
|
||||
<!-- <my-icon iconName="¥.png" class="padding-right-xs icon-rectangle"></my-icon>
|
||||
|
||||
<my-icon iconName="f.png" class="padding-right-xs "></my-icon> -->
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="!listHeight" class="text-cut padding-left-sm text-lg">
|
||||
<text class="text-delete color-333 text-sm padding-right-xs">
|
||||
¥{{siteItem.oilSitePrice|moneyFormat}}/L
|
||||
</text>
|
||||
<!-- <my-icon iconName="¥.png" class="padding-right-xs icon-rectangle"></my-icon>
|
||||
<my-icon iconName="f.png" class="padding-right-xs "></my-icon> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="activity" v-if="siteItem.activitySwitch">
|
||||
<view class="title">活动</view>
|
||||
<view class="content">
|
||||
{{siteItem.activityContent}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="action">
|
||||
<view class="text-grey text-sm " style="padding-top: 6rpx;">
|
||||
<!-- <my-icon iconName="sy-der-icon.png" class="padding-right-xs text-sm"></my-icon> -->
|
||||
{{siteItem.juli|distanceFilter}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
@@ -70,46 +78,46 @@
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
listHeight:{
|
||||
type:Number,
|
||||
default:0
|
||||
listHeight: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
starUrl: this.global.starUrl,
|
||||
defaultLogo:'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/logo_default.png',
|
||||
audioUrl:''
|
||||
defaultLogo: 'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/logo_default.png',
|
||||
audioUrl: ''
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
console.log(this.siteItem,'-----------------')
|
||||
console.log(this.siteItem, '-----------------')
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
filters: {
|
||||
channelCodeFamt(value) {
|
||||
console.log(value)
|
||||
if (!value) {
|
||||
return '未知'
|
||||
// 渠道编码 ( XOIL:星油 WJY:万金油 LV:老吕(找油网) TY:团油 YDJY:一点加油(壳牌))
|
||||
// switch (value) {
|
||||
// case 'XOIL':
|
||||
// return '星油'
|
||||
// case 'WJY':
|
||||
// return '万金油'
|
||||
// case 'LV':
|
||||
// return '老吕(找油网)'
|
||||
// case 'TY':
|
||||
// return '团油'
|
||||
// case 'YDJY':
|
||||
// return '一点加油(壳牌)'
|
||||
// }
|
||||
} else {
|
||||
return value
|
||||
}
|
||||
},
|
||||
channelCodeFamt(value) {
|
||||
console.log(value)
|
||||
if (!value) {
|
||||
return '未知'
|
||||
// 渠道编码 ( XOIL:星油 WJY:万金油 LV:老吕(找油网) TY:团油 YDJY:一点加油(壳牌))
|
||||
// switch (value) {
|
||||
// case 'XOIL':
|
||||
// return '星油'
|
||||
// case 'WJY':
|
||||
// return '万金油'
|
||||
// case 'LV':
|
||||
// return '老吕(找油网)'
|
||||
// case 'TY':
|
||||
// return '团油'
|
||||
// case 'YDJY':
|
||||
// return '一点加油(壳牌)'
|
||||
// }
|
||||
} else {
|
||||
return value
|
||||
}
|
||||
},
|
||||
distanceFilter(value) {
|
||||
if (value) {
|
||||
return value > 1000 ? ((value / 1000).toFixed(2) + 'km') : (value + 'm')
|
||||
@@ -126,20 +134,42 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style scoped lang="scss">
|
||||
.site-item {
|
||||
margin-bottom: 1.8rem;
|
||||
align-items: flex-start !important;
|
||||
height: 150rpx!important;
|
||||
}
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: flex-start !important;
|
||||
padding: 25rpx;
|
||||
// margin-bottom: 1.8rem;
|
||||
line-height:1.5rem;
|
||||
.content {
|
||||
flex:1;
|
||||
overflow: hidden;
|
||||
.action {
|
||||
position: absolute;
|
||||
right: 35rpx;
|
||||
top: 24rpx;
|
||||
}
|
||||
}
|
||||
>.radius {
|
||||
margin-right: 30rpx;
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
font-size: 2em;
|
||||
background-size: 100% 100%;
|
||||
|
||||
.yellow-oil{
|
||||
}
|
||||
}
|
||||
|
||||
.yellow-oil {
|
||||
color: #e8775a;
|
||||
}
|
||||
.cu-avatar{
|
||||
|
||||
.cu-avatar {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
.youpin{
|
||||
|
||||
.youpin {
|
||||
border: 1px solid #e4e4e4;
|
||||
display: flex;
|
||||
border-radius: 5px;
|
||||
@@ -147,7 +177,32 @@
|
||||
margin-right: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.text-xl{
|
||||
|
||||
.text-xl {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.activity {
|
||||
display: flex;
|
||||
width: 85%;
|
||||
// padding: 10rpx 20rpx;
|
||||
border:2rpx solid #1890FF ;
|
||||
border-radius: 10rpx;
|
||||
|
||||
.title {
|
||||
width: 20%;
|
||||
padding: 10rpx 0;
|
||||
line-height: 36rpx;
|
||||
text-align: center;
|
||||
color: #1890FF ;
|
||||
background: #1890FF30;
|
||||
}
|
||||
|
||||
.content {
|
||||
flex: 1;
|
||||
padding: 10rpx 20rpx;
|
||||
line-height: 36rpx;
|
||||
min-height: 80rpx;
|
||||
color: #1890FF;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
...uni.getStorageSync('location'),
|
||||
...this.filterData,
|
||||
comprehensiveSort:1,
|
||||
zpDisable:'ENABLE',
|
||||
// siteBrand: "", // 备注:// 石油品牌 ( 1-中国石油 2-中国石化 3-壳牌 4-民营 5-中海油 6-京博 7-中化石油 8-其他 )
|
||||
// channelCode: "", // 备注:// 渠道编码 ( OIL:星油 WJY:万金油 LV:老吕(找油网) TY:团油 YDJY:一点加油(壳牌))
|
||||
// oilProductCode: "" // 备注:// 油号选择 ( 0# 92# 92#)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name" : "XiaoXing",
|
||||
"appid" : "__UNI__EA8D131",
|
||||
"appid" : "__UNI__113D280",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"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",
|
||||
"pages": [{
|
||||
|
||||
@@ -15,9 +15,10 @@
|
||||
</view>
|
||||
<view class="search-form radius" @tap="InputFocus">
|
||||
<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 class="">
|
||||
<!-- <view class="">
|
||||
阿三
|
||||
</view> -->
|
||||
</view>
|
||||
@@ -108,16 +109,16 @@
|
||||
</view>
|
||||
<!-- 广告图片开始 -->
|
||||
<view class="my-bg padding">
|
||||
<view class="" >
|
||||
<!-- <swiper autoplay interval='5000' style="width: 100%;height: 204rpx;" class="swiper" circular >
|
||||
<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">
|
||||
<image :src="item.src" style="width: 100%;" mode="widthFix"></image>
|
||||
</swiper-item>
|
||||
<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>
|
||||
</swiper-item> -->
|
||||
</swiper>
|
||||
<!-- <image :src="starUrl+'banner.png'" style="width: 100%;" mode="widthFix"></image> -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- 筛选开始 -->
|
||||
@@ -127,8 +128,8 @@
|
||||
</view> -->
|
||||
<view class=" ">
|
||||
<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"
|
||||
class="cu-list menu-avatar cu-item" @tap="toDetail(item)">
|
||||
<site-item v-for="(item,index) in siteList" :key="item.id" :site-item="item" :first="index==0"
|
||||
:listHeight="listHeight" class="cu-list menu-avatar cu-item" @tap="toDetail(item)">
|
||||
</site-item>
|
||||
</view>
|
||||
<view class="" v-else>
|
||||
@@ -158,17 +159,22 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
swiperArray:[
|
||||
// {
|
||||
// src:this.global.starUrl+'banner.png',
|
||||
// link:''
|
||||
// },
|
||||
swiperArray: [
|
||||
{
|
||||
src: 'https://xoil-public.oss-cn-beijing.aliyuncs.com/WMP-IMG/banner-2dwk.png',
|
||||
link: 'https://tengxun.hkzj168.com/?ChannelId=20220831152210221048473'
|
||||
src:this.global.starUrl+'banner.png',
|
||||
link:''
|
||||
},
|
||||
// {
|
||||
// src: 'https://xoil-public.oss-cn-beijing.aliyuncs.com/baichuan_MP/banner_baichuan.png',
|
||||
// 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: {
|
||||
|
||||
},
|
||||
@@ -285,13 +291,13 @@
|
||||
]
|
||||
};
|
||||
},
|
||||
onTabItemTap(res){
|
||||
this.showThreeSites =false
|
||||
onTabItemTap(res) {
|
||||
this.showThreeSites = false
|
||||
},
|
||||
onLoad() {
|
||||
this.reverseGeocoder(this.location)
|
||||
this.refreshLocation()
|
||||
|
||||
|
||||
// if (!uni.getStorageSync('filterData')) {
|
||||
// this.getFilterData()
|
||||
// }
|
||||
@@ -329,38 +335,45 @@
|
||||
},
|
||||
|
||||
methods: {
|
||||
toManagement(){
|
||||
toManagement() {
|
||||
const user = uni.getStorageSync('user');
|
||||
if(user){
|
||||
Financial.findHomePageReport({customerId:user.id}).then(res=>{
|
||||
if(res.data){
|
||||
if (user) {
|
||||
Financial.findHomePageReport({
|
||||
customerId: user.id
|
||||
}).then(res => {
|
||||
if (res.data) {
|
||||
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({
|
||||
url:'../../../Financial/pages/index?guide=1'
|
||||
url: '../../../Financial/pages/index?guide=1'
|
||||
})
|
||||
}
|
||||
});
|
||||
}else{
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '请先登录!',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
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))
|
||||
})
|
||||
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){
|
||||
uni.navigateTo({
|
||||
url: item.JumpPage
|
||||
})
|
||||
}
|
||||
},
|
||||
goToPage(url) {
|
||||
@@ -447,10 +460,11 @@
|
||||
// url: 'plugin://routePlan/index?key=' + this.qqMapKey + '&referer=' + referer +
|
||||
// '&endPoint=' + endPoint
|
||||
// })
|
||||
uni.removeStorageSync("origins")
|
||||
uni.removeStorageSync("destination")
|
||||
uni.removeStorageSync("origins")
|
||||
uni.removeStorageSync("destination")
|
||||
wx.navigateTo({
|
||||
url:'../../../BagStation/pages/routePlain/routePlain'})
|
||||
url: '../../../BagStation/pages/routePlain/routePlain'
|
||||
})
|
||||
} else if (index == 8) {
|
||||
this.goToPage('/BagAuth/pages/agreeMent/OperationGuide')
|
||||
}
|
||||
@@ -489,25 +503,26 @@
|
||||
},
|
||||
|
||||
getSiteList() {
|
||||
let data1 = {
|
||||
let params = {
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
params: { //类型:Object 必有字段 备注:// 筛选对象
|
||||
clientBelong:'ZHONGPIN',
|
||||
sort: "juli", //类型:String 必有字段 备注:// 智能排序 ( price:价格最低 juli:距离最近 ) 默认距离排序
|
||||
// longitude: 117.157817, // 必有字段 备注:// 当前位置经度
|
||||
// latitude: 31.802472, // 必有字段 备注:// 当前位置维度
|
||||
...uni.getStorageSync('location'),
|
||||
...this.filterData,
|
||||
// siteBrand: "", // 备注:// 石油品牌 ( 1-中国石油 2-中国石化 3-壳牌 4-民营 5-中海油 6-京博 7-中化石油 8-其他 )
|
||||
// channelCode: "", // 备注:// 渠道编码 ( OIL:星油 WJY:万金油 LV:老吕(找油网) TY:团油 YDJY:一点加油(壳牌))
|
||||
// oilProductCode: "0#" // 备注:// 油号选择 ( 0# 92# 92#)
|
||||
comprehensiveSort:1
|
||||
clientBelong: 'ZHONGPIN',
|
||||
comprehensiveSort: 1,
|
||||
zpDisable: 'ENABLE',
|
||||
sort: "juli", //类型:String 必有字段 备注:// 智能排序 ( price:价格最低 juli:距离最近 ) 默认距离排序
|
||||
...uni.getStorageSync('location'),
|
||||
...this.filterData,
|
||||
}
|
||||
|
||||
}
|
||||
if (!uni.getStorageSync('user')) {
|
||||
oilSiteApi.readOnlySites(data1).then(res => {
|
||||
oilSiteApi.readOnlySites(params).then(res => {
|
||||
this.getCount++
|
||||
if (res.code == 20000) {
|
||||
// console.log(res.data.list)
|
||||
@@ -542,10 +557,8 @@
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log(data1,'dayindata111111111111')
|
||||
oilSiteApi.getSiteLists(data1).then(res => {
|
||||
oilSiteApi.getSiteLists(params).then(res => {
|
||||
if (res.code == 20000) {
|
||||
// console.log(res.data.list)
|
||||
this.siteList = res.data.list
|
||||
}
|
||||
})
|
||||
@@ -553,7 +566,8 @@
|
||||
},
|
||||
toDetail(item) {
|
||||
let itemS = encodeURIComponent(JSON.stringify(item))
|
||||
console.log(itemS)
|
||||
// console.log(uni.getStorageSync('user'))
|
||||
// return
|
||||
if (uni.getStorageSync('user')) {
|
||||
uni.navigateTo({
|
||||
url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`,
|
||||
@@ -566,13 +580,13 @@
|
||||
})
|
||||
} else {
|
||||
uni.showModal({
|
||||
title:'请您登录',
|
||||
content:"登录小星加油才可以加油 |˛˙꒳˙)♡",
|
||||
confirmText:'去登陆',
|
||||
title: '请您登录',
|
||||
content: "登录小星加油才可以加油 |˛˙꒳˙)♡",
|
||||
confirmText: '去登陆',
|
||||
success: (res) => {
|
||||
if(res.confirm){
|
||||
if (res.confirm) {
|
||||
uni.reLaunch({
|
||||
url:'../../../BagAuth/pages/login/login'
|
||||
url: '../../../BagAuth/pages/login/login'
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -789,4 +803,4 @@
|
||||
.my-icon-sm .text-sm {
|
||||
line-height: 1rem;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -384,16 +384,14 @@
|
||||
siteName: this.siteName,
|
||||
...uni.getStorageSync('location'),
|
||||
// ...this.filterData
|
||||
siteBrand: this.siteName ? '' : this.filterData
|
||||
.siteBrand, // 备注:// 石油品牌 ( 1-中国石油 2-中国石化 3-壳牌 4-民营 5-中海油 6-京博 7-中化石油 8-其他 )
|
||||
channelCode: this.siteName ? '' : this.filterData
|
||||
.channelCode, // 备注:// 渠道编码 ( OIL:星油 WJY:万金油 LV:老吕(找油网) TY:团油 YDJY:一点加油(壳牌))
|
||||
oilProductCode: this.siteName ? '' : this.filterData
|
||||
.oilProductCode, // 备注:// 油号选择 ( 0# 92# 92#)
|
||||
siteBrand: this.siteName ? '' : this.filterData.siteBrand, // 备注:// 石油品牌 ( 1-中国石油 2-中国石化 3-壳牌 4-民营 5-中海油 6-京博 7-中化石油 8-其他 )
|
||||
channelCode: this.siteName ? '' : this.filterData.channelCode, // 备注:// 渠道编码 ( OIL:星油 WJY:万金油 LV:老吕(找油网) TY:团油 YDJY:一点加油(壳牌))
|
||||
oilProductCode: this.siteName ? '' : this.filterData.oilProductCode, // 备注:// 油号选择 ( 0# 92# 92#)
|
||||
provinceCode: this.filterData.provinceCode,
|
||||
cityCode: this.filterData.cityCode,
|
||||
areaCode: this.filterData.areaCode,
|
||||
distance: this.filterData.distance,
|
||||
zpDisable:'ENABLE',
|
||||
comprehensiveSort: this.filterData.comprehensiveSort ? this.filterData.comprehensiveSort : 1
|
||||
}
|
||||
|
||||
|
||||
@@ -4,11 +4,11 @@ import utils from '@/utils/encode'
|
||||
// const env = process.env.NODE_ENV
|
||||
const env = 'production'/* */
|
||||
// const env = 'test'
|
||||
const testUrl = 'http://192.168.0.23: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
|
||||
const productUrl = 'http://uat.xingoil.com/adminapi' // 生产,加密 new
|
||||
const productUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new
|
||||
// const productUrl = 'http://uat.xingoil.com/adminapi' // 生产,加密 new
|
||||
const service = axios.create({
|
||||
baseURL: env == 'production' ? productUrl : testUrl,
|
||||
// baseURL: testUrl,
|
||||
@@ -54,8 +54,8 @@ service.interceptors.request.use(
|
||||
config.data = data
|
||||
// }
|
||||
} else {
|
||||
console.log('\n\n-----------------------')
|
||||
console.log('参数', config.url, '参数加密前', config.data)
|
||||
// console.log('\n\n-----------------------')
|
||||
// console.log('参数', config.url, '参数加密前', config.data)
|
||||
url = config.url
|
||||
}
|
||||
|
||||
@@ -84,8 +84,8 @@ service.interceptors.response.use(
|
||||
// console.log('返回', response.config.url, '返回结果',res)
|
||||
}
|
||||
} else {
|
||||
console.log('返回', response.config.url, '返回结果未加密', res)
|
||||
console.log('-------------------------------------------\n\n')
|
||||
// console.log('返回', response.config.url, '返回结果未加密', res)
|
||||
// console.log('-------------------------------------------\n\n')
|
||||
}
|
||||
|
||||
uni.hideLoading()
|
||||
|
||||
Reference in New Issue
Block a user