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 @@ + + + + + \ 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 @@ @@ -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 @@