From 5c9a65fdcb8ad1cb4769246dc635fdccec05e120 Mon Sep 17 00:00:00 2001
From: caolc <572275724@qq.com>
Date: Thu, 6 Jul 2023 14:09:44 +0800
Subject: [PATCH 1/4] 1
---
Activity/pages/index/index.vue | 122 +++++++++++++++++++++++++++++++++
api/oil-site.js | 7 ++
manifest.json | 2 +-
pages.json | 16 +++++
pages/tabbar/home/home.vue | 109 ++++++++++++++++-------------
utils/request.js | 6 +-
6 files changed, 210 insertions(+), 52 deletions(-)
create mode 100644 Activity/pages/index/index.vue
diff --git a/Activity/pages/index/index.vue b/Activity/pages/index/index.vue
new file mode 100644
index 0000000..822d790
--- /dev/null
+++ b/Activity/pages/index/index.vue
@@ -0,0 +1,122 @@
+
+
+
+
+
+ {{item.activityDetail}}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/oil-site.js b/api/oil-site.js
index f7e514c..b02418f 100644
--- a/api/oil-site.js
+++ b/api/oil-site.js
@@ -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`,
diff --git a/manifest.json b/manifest.json
index 597b48f..64513ae 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,6 +1,6 @@
{
"name" : "XiaoXing",
- "appid" : "__UNI__EA8D131",
+ "appid" : "__UNI__113D280",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
diff --git a/pages.json b/pages.json
index ad7786d..86ac03a 100644
--- a/pages.json
+++ b/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": [{
diff --git a/pages/tabbar/home/home.vue b/pages/tabbar/home/home.vue
index 72fc993..32f27dc 100644
--- a/pages/tabbar/home/home.vue
+++ b/pages/tabbar/home/home.vue
@@ -15,9 +15,10 @@
-
+
-
@@ -108,16 +109,16 @@
-
-
-
+ -->
+
+
@@ -127,8 +128,8 @@
-->
-
@@ -158,17 +159,21 @@
},
data() {
return {
- swiperArray:[
+ swiperArray: [
// {
// 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/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 +290,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 +334,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 +459,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')
}
@@ -498,9 +511,9 @@
// siteBrand: "", // 备注:// 石油品牌 ( 1-中国石油 2-中国石化 3-壳牌 4-民营 5-中海油 6-京博 7-中化石油 8-其他 )
// channelCode: "", // 备注:// 渠道编码 ( OIL:星油 WJY:万金油 LV:老吕(找油网) TY:团油 YDJY:一点加油(壳牌))
// oilProductCode: "0#" // 备注:// 油号选择 ( 0# 92# 92#)
- clientBelong:'ZHONGPIN',
- comprehensiveSort:1,
- zpDisable:'ENABLE',
+ clientBelong: 'ZHONGPIN',
+ comprehensiveSort: 1,
+ zpDisable: 'ENABLE',
sort: "juli", //类型:String 必有字段 备注:// 智能排序 ( price:价格最低 juli:距离最近 ) 默认距离排序
...uni.getStorageSync('location'),
...this.filterData,
@@ -566,13 +579,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 +802,4 @@
.my-icon-sm .text-sm {
line-height: 1rem;
}
-
+
\ No newline at end of file
diff --git a/utils/request.js b/utils/request.js
index 900e545..dd15c78 100644
--- a/utils/request.js
+++ b/utils/request.js
@@ -2,9 +2,9 @@ import axios from 'axios'
import utils from '@/utils/encode'
// const env = process.env.NODE_ENV
-// const env = 'production'/* */
-const env = 'production'
-const testUrl = 'http://192.168.110.230:38080'
+const env = 'production'/* */
+// const env = 'test'
+const testUrl = 'http://192.168.0.254:38080'
// const productUrl = 'http://121.196.213.68/adminapi' //预生产
const productUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new
From df9a5efa5006d9dd88cdb380592c953389ff3261 Mon Sep 17 00:00:00 2001
From: xiaozhiyong
Date: Fri, 21 Jul 2023 10:49:26 +0800
Subject: [PATCH 2/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
BagStation/pages/components/price-tab.vue | 27 ++-
.../pages/stationDetail/stationDetail.vue | 2 +-
components/site-item/site-item.vue | 185 ++++++++++++------
3 files changed, 147 insertions(+), 67 deletions(-)
diff --git a/BagStation/pages/components/price-tab.vue b/BagStation/pages/components/price-tab.vue
index 4bfb7e2..26c3587 100644
--- a/BagStation/pages/components/price-tab.vue
+++ b/BagStation/pages/components/price-tab.vue
@@ -32,6 +32,11 @@
{{itemy}}
+
+
+ {{siteInfo.activityContent}}
+
+
@@ -43,6 +48,12 @@
channelList: {
type: Array,
default () {}
+ },
+ siteInfo:{
+ type: Object,
+ default: () => {
+ return {}
+ }
}
},
data() {
@@ -128,7 +139,7 @@
}
-
diff --git a/BagStation/pages/stationDetail/stationDetail.vue b/BagStation/pages/stationDetail/stationDetail.vue
index 8231a16..d87d189 100644
--- a/BagStation/pages/stationDetail/stationDetail.vue
+++ b/BagStation/pages/stationDetail/stationDetail.vue
@@ -61,7 +61,7 @@
+ :channel-list="siteInfo.oilSiteChannelDetailsVos" :siteInfo="siteInfo">
diff --git a/components/site-item/site-item.vue b/components/site-item/site-item.vue
index 20a61f8..87194a4 100644
--- a/components/site-item/site-item.vue
+++ b/components/site-item/site-item.vue
@@ -1,25 +1,34 @@
-
-
-
-
+
+
+
+
+
+
+
+
+ {{siteItem.juli|distanceFilter}}
+
+
- {{siteItem.siteName}}
+ {{siteItem.siteName}}
- {{siteItem.listTag|channelCodeFamt}}
+ {{siteItem.listTag|channelCodeFamt}}
距离最近
-
-
- {{siteItem.address}}
-
+
+
+ {{siteItem.address}}
+
-
-
+
+
{{item.oilProductCode}}
@@ -36,25 +45,24 @@
省¥{{(siteItem.oilSitePrice - siteItem.sitePrice)|moneyFormat}}
-
-
-
- ¥{{siteItem.oilSitePrice|moneyFormat}}/L
+
+
+
+ ¥{{siteItem.oilSitePrice|moneyFormat}}/L
-
-
-
+
+
+ 活动
+
+ {{siteItem.activityContent}}
+
+
-
-
-
-
- {{siteItem.juli|distanceFilter}}
-
-
+
+
@@ -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 @@
}
-
From 2bd0a3b42e7e7e67e1df407df8f0866f0e6159ca Mon Sep 17 00:00:00 2001
From: xiaozhiyong
Date: Sat, 29 Jul 2023 10:05:49 +0800
Subject: [PATCH 3/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
BagStation/orderDetail/orderDetail.vue | 168 ++++++++++++++++---------
1 file changed, 112 insertions(+), 56 deletions(-)
diff --git a/BagStation/orderDetail/orderDetail.vue b/BagStation/orderDetail/orderDetail.vue
index 0e1b371..b2ae560 100644
--- a/BagStation/orderDetail/orderDetail.vue
+++ b/BagStation/orderDetail/orderDetail.vue
@@ -1,5 +1,5 @@
-
+
返回
订单支付结果
@@ -13,14 +13,15 @@
-
+
-
+
+
壳牌
@@ -38,7 +39,8 @@
订单编号:
- {{order.orderSerialNumber?order.orderSerialNumber:''}}
+ {{order.orderSerialNumber?order.orderSerialNumber:''}}
@@ -87,7 +89,8 @@
星油优惠:
- {{order.xoilDiscountAmount>0?order.xoilDiscountAmount:'xxx.x'|moneyFormat}}
+ {{order.xoilDiscountAmount>0?order.xoilDiscountAmount:'xxx.x'|moneyFormat}}
优惠券:
@@ -96,12 +99,13 @@
合计:
- {{order.payRealAmount>0?order.payRealAmount:'xxx.x' }}
+ {{order.payRealAmount>0?order.payRealAmount:'xxx.x' }}
支付方式:
随行付支付
-
+
{{order.payAccountType==0?'个人账户支付':'企业账户支付'}}
@@ -128,28 +132,31 @@
-
+ v-if="showMiniBtn">
-
-
+
+
+
+
更多
-
+
-
@@ -158,7 +165,8 @@
立即支付
取消订单
-
+
在线客服
@@ -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,12 +344,12 @@
}
})
},
- toDetail(item) {
- if(item.zpDisable === 'DISABLE') return
- 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)
},
@@ -326,7 +359,7 @@
})
},
cancelOrder() {
-
+
orderApi.cancelOrder(this.id).then(res => {
if (res.code == 20000) {
uni.showToast({
@@ -369,7 +402,7 @@
}
},
- onLoad(option) {
+ onLoad(option) {
this.id = option.id
this.getOrderInfo()
uni.showShareMenu()
@@ -383,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
}
@@ -407,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
@@ -451,19 +484,41 @@
}
-