pull/1/head
caoliancun 2 years ago
parent ea8e9f9eb7
commit 8ca3069737
  1. 39
      App.vue
  2. 2
      BagAuth/pages/login/login.vue
  3. 11
      BagAuth/pages/login/oldLogin.vue
  4. 2
      BagAuth/pages/login/register.vue
  5. 2
      BagSetup/setup/setup.vue
  6. 42
      BagStation/pages/components/price-select-tab.vue
  7. 4
      BagStation/pages/components/price-tab.vue
  8. 11
      BagStation/pages/makeOrder/orderPaying.vue
  9. 6
      colorui/main.css
  10. 8
      components/sl-filter/filter-view.vue
  11. 73
      main.js
  12. 43
      package-lock.json
  13. 12
      pages.json
  14. 3
      pages/components/showModels.vue
  15. 15
      pages/index/startPage/startPage.vue
  16. 1
      pages/tabbar/home/home.vue
  17. 3
      pages/tabbar/order/orderList/orderList.vue
  18. 2
      pages/tabbar/qrCenter/qrCenter.vue
  19. 128
      pages/tabbar/station/stationList.vue
  20. 11
      pages/tabbar/user/user.vue
  21. 2
      utils/request.js

@ -8,6 +8,35 @@
export default {
data() {
return {
menuList: [{
title: '渠道',
isMutiple: false,
key: 'channelCode',
detailList: [{
title: "全部",
value: ""
}]
},
{
title: '0#轻柴油',
key: 'oilProductCode',
isMutiple: false,
detailList: [{
title: "全部",
value: ""
}]
},
{
title: '品牌',
key: 'siteBrand',
isSort: true,
isMutiple: false,
detailList: [{
title: "全部",
value: ""
}]
}
],
loginStatus: 'online',
msg: ''
}
@ -69,11 +98,13 @@
this.menuList[1].detailList = this.menuList[1].detailList.concat(productCodes)
this.menuList[2].detailList = this.menuList[2].detailList.concat(siteBrands)
uni.setStorageSync('filterData', this.menuList)
console.log(uni.getStorageSync('filterData'),'pppppppppppppppppppppppp')
// this.$refs.slFilter.resetMenuList(this.menuList)
}
})
},
onShareAppMessage() {
let that = this
wx.onAppRoute(() => {
let white = ['BagStation/pages/stationDetail/stationDetail']
// console.log(' onShareAppMessage')
@ -86,7 +117,7 @@
// data.isOverShare = true
view.onShareAppMessage = () => { //
return {
title: '百川加油',
title: '中品加油',
path: "/pages/index/startPage/startPage", //path
// imageUrl:'/image/onshowMessage.png' //imageUrl
imageUrl: 'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/login-bg.png',
@ -121,8 +152,12 @@
clearTimeout(onlineTimer)
}
})
}else{
// if(!uni.getStorageSync('filterData')){
// that.getFilterData()
// }
}
}, 1000)
}, 500)
} else {
// loginTimer = setTimeout(() => {

@ -25,7 +25,7 @@
</view>
<view class="cu-item flex-sub" :class="0==TabCur?'text-red cur':''" @tap="tabSelect(0)">
<view class="cu-item flex-sub" :class="0==TabCur?'text-blues cur':''" @tap="tabSelect(0)">

@ -7,9 +7,9 @@
:style="'background-image: url('+imgURL+'login-bg-top.png);height: 480upx;'">
<view class="padding-xl ">
<view class="image login-bg">
<image :src="imgURL+'new-logo.png'" mode="widthFix"></image>
<image :src="otherImgURL+'logo@ZP.png'" mode="widthFix"></image>
<view class="text-bold text-lg padding-top">
一路油你 百川加油
一路油你 中品加油
</view>
<view class="text-df text-grey padding-top-xs padding-bottom">
登录后加油更便捷
@ -29,7 +29,7 @@
</view> -->
<view class="cu-item text-bold text-lg flex-sub "
:class="[0==TabCur?'text-red cur':'',(animation=='animation-fades'&&0==TabCur)?'animation-fade':'']"
:class="[0==TabCur?'text-blues cur':'',(animation=='animation-fades'&&0==TabCur)?'animation-fade':'']"
@tap="tabSelect(0)">
个人账号
</view>
@ -144,6 +144,7 @@
verifyCodeToken: "",
accuntSource: false,
imgURL: this.global.imgURL,
otherImgURL: this.global.otherImgURL,
loadModal: false,
active: 0,
@ -229,7 +230,7 @@
title: res.data.msg,
content: '企业账号只能由企业分配,请确认是否当前手机号,如有疑问,请联系客服处理',
showCancel: false,
confirmColor: '#FE0505',
confirmColor: '#1890FF',
success: (res) => {
if (confirm) {
@ -270,7 +271,7 @@
uni.showModal({
title: res.data.msg,
confirmText: '立即注册',
confirmColor: '#FE0505',
confirmColor: '#1890FF',
success: (res) => {
if (res.confirm) {
uni.setStorageSync('username', that.driver.username)

@ -9,7 +9,7 @@
<view class="image login-bg">
<image :src="imgURL+'new-logo.png'" mode="widthFix"></image>
<view class="text-bold text-lg padding-top">
一路油你 百川加油
一路油你 中品加油
</view>
<view class="text-df text-grey padding-top-xs padding-bottom">
注册为个人会员

@ -75,7 +75,7 @@
</view>
<view class="cu-item arrow">
<view class="content">
关于佰川能源
关于中品能源
</view>
<view class="value">
版本{{'1.0.0'}}

@ -3,12 +3,12 @@
<view class="text-center padding-sm">
<view class="text-lg">
请提醒加油员使用
<text class="text-red padding-left-xs padding-right-xs">{{showtitles}}</text>
<text class="text-blues padding-left-xs padding-right-xs">{{showtitles}}</text>
进行订单核实
</view>
</view>
<scroll-view scroll-x class=" nav text-center">
<view class="cu-item" v-for="(item,index) in channelList" v-if="index==activeCur" :class="index==activeCur?'text-red cur':''" :key="item.channelId"
<view class="cu-item" v-for="(item,index) in channelList" v-if="index==activeCur" :class="index==activeCur?'text-blues cur':''" :key="item.channelId"
@tap="tabSelect" :data-id="index" :data-channel-code="item.channelCode">
<image class="site-icon margin-right-sm" :src="imgURL+'site-'+item.channelCode+'.png'" mode="widthFix">
</image>
@ -20,12 +20,12 @@
<view class="cu-list menu text-left">
<view class="cu-item" v-for="(itemx,index) in oilSitePriceDetailsVo" :key="index" v-if="itemx.sitePrice>0">
<label class="flex justify-between align-center flex-sub">
<radio class="round red" :class="radio=='radio' + index?'checked':''" :checked= " radio ==index?true : false" :value="index"></radio>
<radio class="round blue" :class="radio=='radio' + index?'checked':''" :checked= " radio ==index?true : false" :value="index"></radio>
<text class="cu-tag my-tag line-red text-lg">
</text>
<text class="text-bold text-black text-lg">{{itemx.oilProductCode}}</text>
<text class="text-bold text-red text-lg">{{itemx.sitePrice!=0?itemx.sitePrice:'-.--'}}/L</text>
<text class="text-bold text-blues text-lg">{{itemx.sitePrice!=0?itemx.sitePrice:'-.--'}}/L</text>
<text class="text-delete">{{itemx.oilSitePrice}}/L</text>
<text class="text-sm">预计每100L节省{{(100*(itemx.oilSitePrice - itemx.sitePrice))|moneyFormat}}</text>
</label>
@ -39,9 +39,9 @@
<view class="padding-top-sm">
<view class="grid col-5 ">
<view v-for="(item,index) in checkBar" class="padding-xs" :key="index">
<button class="cu-btn red block" :class="item.checked?'bg-blue':'line-red'" @tap="ChooseBar" :data-value="item.value">
<button class="cu-btn red block" :class="item.checked?'bg-blue':'line-blues'" @tap="ChooseBar" :data-value="item.value">
{{item.name}}
<view class="cu-tag sm round" :class="item.checked?'bg-white text-red':'bg-blue'" v-if="item.hot">HOT</view>
<view class="cu-tag sm round" :class="item.checked?'bg-white text-blues':'bg-blue'" v-if="item.hot">HOT</view>
</button>
</view>
@ -107,9 +107,9 @@
</view>
<view class="grid col-5 padding-sm">
<view v-for="(item,index) in checkMoney" class="padding-xs" :key="index">
<button class="cu-btn red block" style=" padding: 0;" :class="item.checked?'bg-blue':'line-red'" @tap="ChooseCheckMoney(item.value)" :data-value="item.value">
<button class="cu-btn blue block" style=" padding: 0;" :class="item.checked?'bg-blue':'line-blues'" @tap="ChooseCheckMoney(item.value)" :data-value="item.value">
{{item.name}}&yen;
<view class="cu-tag sm round" :class="item.checked?'bg-white text-red':'bg-blue'" v-if="item.hot">HOT</view>
<view class="cu-tag sm round" :class="item.checked?'bg-white text-blues':'bg-blue'" v-if="item.hot">HOT</view>
</button>
</view>
</view>
@ -137,7 +137,7 @@
<view v-for="(item,index) in checkVol" class="padding-xs" :key="index">
<button class="cu-btn red block" :class="item.checked?'bg-blue':'line-red'" @tap="ChooseCheckVol" :data-value="item.value">
{{item.name}}
<view class="cu-tag sm round" :class="item.checked?'bg-white text-red':'bg-blue'" v-if="item.hot">HOT</view>
<view class="cu-tag sm round" :class="item.checked?'bg-white text-blues':'bg-blue'" v-if="item.hot">HOT</view>
</button>
</view>
@ -164,7 +164,7 @@
<view class="margin cu-list pay-bar menu radius solid-top solid-bottom solid-left">
<view class="cu-item ">
<view class="">
合计<text class="text-red">{{realMoney>0?realMoney:'xxx.x'|moneyFormat}}</text>
合计<text class="text-blues">{{realMoney>0?realMoney:'xxx.x'|moneyFormat}}</text>
</view>
<view class="" @tap="showOrderMsg">
明细<text class="cuIcon-unfold padding-left-xs"></text>
@ -181,8 +181,8 @@
<view class="margin cu-list pay-bar menu radius solid-top solid-bottom solid-left">
<view class="cu-item ">
<view class="">
合计<text class="text-red fr" v-if="activeChannelCode!='TY'">{{realMoney>0?realMoney:'xxx.x'|moneyFormat}}</text>
<text class="text-red fr" v-else>{{ty.realMoney>0?ty.realMoney-tyRes.depreciateAmount:'xxx.x'|moneyFormat}}</text>
合计<text class="text-blues fr" v-if="activeChannelCode!='TY'">{{realMoney>0?realMoney:'xxx.x'|moneyFormat}}</text>
<text class="text-blues fr" v-else>{{ty.realMoney>0?ty.realMoney-tyRes.depreciateAmount:'xxx.x'|moneyFormat}}</text>
</view>
<view class="" @tap="showOrderMsg">
明细<text class="cuIcon-unfold padding-left-xs"></text>
@ -200,7 +200,7 @@
<view class="cu-bar bg-white justify-end">
<view class="content">订单明细</view>
<view class="action" @tap="showOrder=''">
<text class="cuIcon-close text-red"></text>
<text class="cuIcon-close text-blues"></text>
</view>
</view>
<view class="bg-white dashed-top">
@ -224,7 +224,7 @@
</view>
<view class="padding-tb-xs text-left">
星油优惠
<text class="text-red fr">{{discount>0?discount:'xxx.x'|moneyFormat}}</text>
<text class="text-blues fr">{{discount>0?discount:'xxx.x'|moneyFormat}}</text>
</view>
</view>
<view class="" v-else>
@ -238,25 +238,25 @@
</view>
<view class="padding-tb-xs text-left">
直降金额
<text class="text-red fr">{{tyRes.depreciateAmount>0?tyRes.depreciateAmount:'xxx.x'|moneyFormat}}</text>
<text class="text-blues fr">{{tyRes.depreciateAmount>0?tyRes.depreciateAmount:'xxx.x'|moneyFormat}}</text>
</view>
</view>
<view class="padding-tb-xs text-left">
优惠券
<text class="text-red fr">{{'----'}}</text>
<text class="text-blues fr">{{'----'}}</text>
</view>
<view class="padding-tb-xs text-left">
合计
<text class="text-red fr" v-if="activeChannelCode!='TY'">{{realMoney>0?realMoney:'xxx.x'|moneyFormat}}</text>
<text class="text-red fr" v-else>{{ty.realMoney>0?ty.realMoney:'xxx.x'|moneyFormat}}</text>
<text class="text-blues fr" v-if="activeChannelCode!='TY'">{{realMoney>0?realMoney:'xxx.x'|moneyFormat}}</text>
<text class="text-blues fr" v-else>{{ty.realMoney>0?ty.realMoney:'xxx.x'|moneyFormat}}</text>
</view>
</view>
<view class="cu-list margin pay-bar menu radius solid-top solid-bottom solid-left">
<view class="cu-item ">
<view class="">
合计<text class="text-red" v-if="activeChannelCode!='TY'">{{realMoney>0?realMoney:'xxx.x'|moneyFormat}}</text>
<text class="text-red" v-else>{{ty.realMoney>0?ty.realMoney-tyRes.depreciateAmount:'xxx.x'|moneyFormat}}</text>
合计<text class="text-blues" v-if="activeChannelCode!='TY'">{{realMoney>0?realMoney:'xxx.x'|moneyFormat}}</text>
<text class="text-blues" v-else>{{ty.realMoney>0?ty.realMoney-tyRes.depreciateAmount:'xxx.x'|moneyFormat}}</text>
</view>
<view class="" @tap="showOrder=''">
明细<text class="cuIcon-fold padding-left-xs"></text>
@ -274,7 +274,7 @@
<view class="cu-bar bg-white justify-end">
<view class="content">车牌号非必填</view>
<view class="action" @tap="showPlate=''">
<text class="cuIcon-close text-red"></text>
<text class="cuIcon-close text-blues"></text>
</view>
</view>

@ -1,7 +1,7 @@
<template>
<view class="padding-top">
<scroll-view scroll-x class=" nav text-center">
<view class="cu-item" v-for="(item,index) in channelList" :class="index==TabCur?'text-red cur':''" :key="item.channelId"
<view class="cu-item" v-for="(item,index) in channelList" :class="index==TabCur?'text-blues cur':''" :key="item.channelId"
@tap="tabSelect" :data-id="index">
<image class="site-icon margin-right-sm" :src="imgURL+'site-'+item.channelCode+'.png'" mode="widthFix">
</image>
@ -16,7 +16,7 @@
</text>
<text class="text-bold text-black text-lg">{{itemx.oilProductCode}}</text>
<text class="text-bold text-red text-lg">{{itemx.sitePrice==0?'-.--':itemx.sitePrice}}/L</text>
<text class="text-bold text-blues text-lg">{{itemx.sitePrice==0?'-.--':itemx.sitePrice}}/L</text>
<text class="text-delete">{{itemx.oilSitePrice}}/L</text>
<text class="text-xs ">预计每100L节省{{(100*(itemx.oilSitePrice - itemx.sitePrice))|moneyFormat}}</text>
<!-- <text class="text-gray text-delete">$市场价</text>

@ -2,7 +2,7 @@
<view>
<cu-custom class="main-totextbar bg-main-oil" :isBack="true" bgColor="bg-main-oil">
<block slot="backText">返回</block>
<block slot="content">佰川收银台</block>
<block slot="content">中品收银台</block>
</cu-custom>
<view class="">
<view class="padding-xl text-center">
@ -146,16 +146,16 @@
<view class="padding-tb-xs text-left">
星油优惠
<text
class="text-red fr">{{order.oilDiscountAmount>0?order.oilDiscountAmount:'xxx.x'|moneyFormat}}</text>
class="text-blues fr">{{order.oilDiscountAmount>0?order.oilDiscountAmount:'xxx.x'|moneyFormat}}</text>
</view>
<view class="padding-tb-xs text-left">
优惠券
<text
class="text-red fr">{{order.couponDiscountAmount>0?order.couponDiscountAmount:'xxx.x'|moneyFormat}}</text>
class="text-blues fr">{{order.couponDiscountAmount>0?order.couponDiscountAmount:'xxx.x'|moneyFormat}}</text>
</view>
<view class="padding-tb-xs text-left">
合计
<text class="text-red text-bold text-lg fr">
<text class="text-blues text-bold text-lg fr">
{{order.realAmount>0? moneyIntercept(order.realAmount) :'xxx.x' }}</text>
</view>
</view>
@ -392,7 +392,8 @@
"orderSerialNumber": this.order.orderSerialNumber, //String
"payChannel": "BALANCE_PAYMENT", //String BALANCE_PAYMENT
"orderMethod": "CUSTOMER_ACTIVE", //String CUSTOMER_ACTIVE
"createSource": "XOIL_DRIVER_WECHAT_APPLET"
"createSource": "XOIL_DRIVER_WECHAT_APPLET",
merchantNo: '10088997357',
}
oilOrderApi.payOrder(payData).then(res => {
if (res.code == 20000) {

@ -3842,7 +3842,11 @@ scroll-view.cu-steps .cu-item {
.text-right {
text-align: right;
}
.text-blues,
.line-blues,
.lines-blues {
color: #1890FF;
}
.text-red,
.line-red,
.lines-red {

@ -119,15 +119,17 @@
}
},
created() {
setTimeout(()=>{
console.log('%c 子组件参数↓','font-size:30px;color:red')
},
mounted() {
if(this.areaCodeList1.length == 0){
this.areaCodeList = uni.getStorageSync('areaCodeList')
}else{
this.areaCodeList = this.areaCodeList1
}
this.areaCodeList.unshift({areaName:'全部'})
},1000)
console.log('%c 子组件参数↓','font-size:30px;color:red')
this.$forceUpdate();
},
computed: {
selectedTitleObj() {

@ -15,7 +15,7 @@ import global from '@/api/global.js'
import Empty from '@/components/Empty.vue'
import {share} from './mixins/index.js'
import oilSiteApi from '@/api/oil-site.js'
Vue.mixin(share)
// Vue.component('home', home)
// Vue.component('user', user)
@ -33,6 +33,77 @@ Vue.prototype.moneyIntercept = function(value){
return Number(value).toFixed(2)
}
}
Vue.prototype.SetFilterData = function(value){
return new Promise((re,rj)=>{
let menuList = [{
title: '渠道',
isMutiple: false,
key: 'channelCode',
detailList: [{
title: "全部",
value: ""
}]
},
{
title: '0#轻柴油',
key: 'oilProductCode',
isMutiple: false,
detailList: [{
title: "全部",
value: ""
}]
},
{
title: '品牌',
key: 'siteBrand',
isSort: true,
isMutiple: false,
detailList: [{
title: "全部",
value: ""
}]
}
]
if(uni.getStorageSync('filterData')){
re('ok')
}else{
oilSiteApi.getCheckInfo().then(res => {
if (res.code == 20000) {
let channelCodes = []
res.data.channelCodes.map(item => {
channelCodes.push({
title: item.name,
value: item.id
})
})
let productCodes = []
res.data.productCodes.map(item => {
productCodes.push({
title: item.name,
value: item.id
})
})
let siteBrands = []
res.data.siteBrands.map(item => {
siteBrands.push({
title: item.name,
value: item.id
})
})
console.log(channelCodes, productCodes, siteBrands)
menuList[0].detailList = menuList[0].detailList.concat(channelCodes)
menuList[1].detailList = menuList[1].detailList.concat(productCodes)
menuList[2].detailList = menuList[2].detailList.concat(siteBrands)
uni.setStorageSync('filterData', this.menuList);
re('ok')
}else{
rj('no')
}
})
}
})
}
let qqmapsdk = new QQMapWX({
// key: 'IUKBZ-5MKL3-HXB3P-3OS7U-6MHX3-MYBI3'
key:'NYEBZ-YURY3-XTU3N-YBR54-PKW6E-ROB2F'

43
package-lock.json generated

@ -1,37 +1,62 @@
{
"name": "wechat-oil",
"version": "1.0.0",
"lockfileVersion": 1,
"lockfileVersion": 3,
"requires": true,
"dependencies": {
"axios": {
"packages": {
"": {
"name": "wechat-oil",
"version": "1.0.0",
"license": "ISC",
"devDependencies": {
"axios": "^0.21.3",
"crypto-js": "^4.0.0",
"js-cookie": "^2.2.1",
"js-md5": "^0.7.3"
}
},
"node_modules/axios": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.3.tgz",
"integrity": "sha512-JtoZ3Ndke/+Iwt5n+BgSli/3idTvpt5OjKyoCmz4LX5+lPiY5l7C1colYezhlxThjNa/NhngCUWZSZFypIFuaA==",
"dev": true,
"requires": {
"dependencies": {
"follow-redirects": "^1.14.0"
}
},
"crypto-js": {
"node_modules/crypto-js": {
"version": "4.0.0",
"resolved": "https://registry.nlark.com/crypto-js/download/crypto-js-4.0.0.tgz",
"integrity": "sha1-KQSrJnep0EKFai6i74DekuSjbcw=",
"dev": true
},
"follow-redirects": {
"node_modules/follow-redirects": {
"version": "1.14.3",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.3.tgz",
"integrity": "sha512-3MkHxknWMUtb23apkgz/83fDoe+y+qr0TdgacGIA7bew+QLBo3vdgEN2xEsuXNivpFy4CyDhBBZnNZOtalmenw==",
"dev": true
"dev": true,
"funding": [
{
"type": "individual",
"url": "https://github.com/sponsors/RubenVerborgh"
}
],
"engines": {
"node": ">=4.0"
},
"peerDependenciesMeta": {
"debug": {
"optional": true
}
}
},
"js-cookie": {
"node_modules/js-cookie": {
"version": "2.2.1",
"resolved": "https://registry.npm.taobao.org/js-cookie/download/js-cookie-2.2.1.tgz",
"integrity": "sha1-aeEG3F1YBolFYpAqpbrsN0Tpsrg=",
"dev": true
},
"js-md5": {
"node_modules/js-md5": {
"version": "0.7.3",
"resolved": "https://registry.npm.taobao.org/js-md5/download/js-md5-0.7.3.tgz",
"integrity": "sha1-tPL7sLMnRV9ZjWcn447Ccs0Jw/I=",

@ -3,20 +3,20 @@
{
"path": "pages/index/startPage/startPage",
"style": {
"navigationBarTitleText": "佰川加油"
"navigationBarTitleText": "中品加油"
}
},
{
"path": "pages/tabbar/home/home",
"style": {
"navigationBarTitleText": "佰川加油" // "enablePullDownRefresh": true
"navigationBarTitleText": "中品加油" // "enablePullDownRefresh": true
}
},
{
"path": "pages/tabbar/order/orderList/orderList",
"style": {
"navigationBarTitleText": "佰川加油", // "enablePullDownRefresh": true
"navigationBarTitleText": "中品加油", // "enablePullDownRefresh": true
"enablePullDownRefresh": true
}
},
@ -24,7 +24,7 @@
{
"path": "pages/tabbar/station/stationList",
"style": {
"navigationBarTitleText": "佰川加油", // "enablePullDownRefresh": true
"navigationBarTitleText": "中品加油", // "enablePullDownRefresh": true
"enablePullDownRefresh": true
}
},
@ -32,7 +32,7 @@
{
"path": "pages/tabbar/user/user",
"style": {
"navigationBarTitleText": "佰川加油" // "enablePullDownRefresh": true
"navigationBarTitleText": "中品加油" // "enablePullDownRefresh": true
}
}
@ -275,7 +275,7 @@
"allowsBounceVertical": "NO"
},
"navigationBarBackgroundColor": "#f33e54",
"navigationBarTitleText": "佰川加油",
"navigationBarTitleText": "中品加油",
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
},

@ -6,7 +6,7 @@
<view class="cu-bar bg-white justify-end">
<!-- <view class="content">您还没有完成认证</view> -->
<view class="content text-center overflow-unset">
<image :src="imgURL+'default-avator.png'" mode="widthFix" class="ro-right "></image>
<image :src="otherImgURL+'ic-t@ZP.png'" mode="widthFix" class="ro-right "></image>
</view>
<view class="action" @tap="hideModal('auth')">
<text class="cuIcon-close text-red"></text>
@ -83,6 +83,7 @@
},
data() {
return {
otherImgURL: this.global.otherImgURL,
imgURL: this.global.imgURL,
showPlateList: true,
showInputList: false,

@ -53,11 +53,11 @@
key = '离线'
}
if (key == '在线') {
if (!uni.getStorageSync('filterData')) {
this.getFilterData()
} else if (uni.getStorageSync('filterData')[0].detailList.length < 2) {
this.getFilterData()
}
// if (!uni.getStorageSync('filterData')) {
// this.getFilterData()
// } else if (uni.getStorageSync('filterData')[0].detailList.length < 2) {
// this.getFilterData()
// }
}
// 广
let interstitialAd = null
@ -142,8 +142,10 @@
},
methods: {
getFilterData() {
console.log('在线')
oilSiteApi.getCheckInfo().then(res => {
if (res.code == 20000) {
console.log('接口返回正常')
let channelCodes = []
res.data.channelCodes.map(item => {
channelCodes.push({
@ -169,7 +171,8 @@
this.menuList[0].detailList = this.menuList[0].detailList.concat(channelCodes)
this.menuList[1].detailList = this.menuList[1].detailList.concat(productCodes)
this.menuList[2].detailList = this.menuList[2].detailList.concat(siteBrands)
uni.setStorageSync('filterData', this.menuList)
uni.setStorageSync('filterData', this.menuList);
console.log('存入',this.menuList)
// this.$refs.slFilter.resetMenuList(this.menuList)
}
})

@ -517,6 +517,7 @@
currentPage: 1,
pageSize: 10,
params: { //Object //
clientBelong:'ZHONGPIN',
sort: "juli", //String // ( price juli )
// longitude: 117.157817, // //
// latitude: 31.802472, // //

@ -136,7 +136,7 @@
}
},
onShow() {
this.initList()
// this.initList()
},
onLoad() {
this.initList()
@ -242,6 +242,7 @@
pageSize: 10, //Number
index: (page - 1) * 10,
params: { //Object
clientBelong:'ZHONGPIN',
orderStatus: id == '全部' ? '' : (id +''), //String 0 1 -1 23退
search: this.search //类型:String 必有字段 备注:搜索 ( 油站名称/ 订单编号/ 油品)
},

@ -1,7 +1,7 @@
<template>
<view class="page-content">
<cu-custom class="bg-main-oil" bgColor="bg-main-oil">
<block slot="content">佰川加油</block>
<block slot="content">中品加油</block>
</cu-custom>
<view class="margin-top-lg">
<swiper class="screen-swiper text-center square-dot" :indicator-dots="true"

@ -33,12 +33,13 @@
<!-- 筛选开始 -->
<scroll-view class="screentop bg-white" style="flex: 1;">
<view class="">
<sl-filter reflexTitle ref="slFilter" :productCodeList="productCodeList" :areaCodeList="areaCodeList" @result="filterRes" :menuList="menuList"></sl-filter>
<sl-filter v-if="isFilterData" reflexTitle ref="slFilter" :productCodeList="productCodeList" :areaCodeList="areaCodeList"
@result="filterRes" :menuList="menuList"></sl-filter>
<!-- <sl-filter reflexTitle ref="slFilter" @result="filterRes" :menuList="menuList"></sl-filter> -->
</view>
<view class="bg-white min-height-50 padding-top" 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 class="placeholder-hidden">
@ -71,18 +72,17 @@
filterData: {
// oilProductCode: '0#'
},
contentTitle:'您当前位置附近没有油站,可以点击左上角-距离-选择其他省市进行查看。',
isFilterData:false,
contentTitle: '您当前位置附近没有油站,可以点击左上角-距离-选择其他省市进行查看。',
loadStatus: 'load',
listHeight:160,
areaCodeList:[],
listHeight: 160,
areaCodeList: [],
siteName: '',
menuList:[
{
menuList: [{
title: '距离',
isMutiple: false,
key: 'distance',
detailList: [
{
detailList: [{
title: "全部",
value: ''
},
@ -131,7 +131,8 @@
{
title: "LNG",
value: "LNG"
}]
}
]
},
// {
// title: '',
@ -258,6 +259,8 @@
this.refreshLocation()
if (!uni.getStorageSync('filterData')) {
this.getFilterData()
} else {
this.isFilterData=true
}
this.getSiteList()
},
@ -288,39 +291,73 @@
this.getSiteList()
},
getFilterData() {
let menuList = [{
title: '渠道',
isMutiple: false,
key: 'channelCode',
detailList: [{
title: "全部",
value: ""
}]
},
{
title: '0#轻柴油',
key: 'oilProductCode',
isMutiple: false,
detailList: [{
title: "全部",
value: ""
}]
},
{
title: '品牌',
key: 'siteBrand',
isSort: true,
isMutiple: false,
detailList: [{
title: "全部",
value: ""
}]
}
]
oilSiteApi.getCheckInfo().then(res => {
if (res.code == 20000) {
uni.setStorageSync('productCodeList', res.data.productCodeList)
uni.setStorageSync('areaCodeList', res.data.areaCodeList)
this.areaCodeList = uni.getStorageSync('areaCodeList')
if(uni.getStorageSync('areaCodeList')){
let channelCodes = []
res.data.channelCodes.map(item => {
channelCodes.push({
title: item.name,
value: item.id
})
})
let productCodes = []
res.data.productCodes.map(item => {
productCodes.push({
title: item.name,
value: item.id
})
})
let siteBrands = []
res.data.siteBrands.map(item => {
siteBrands.push({
title: item.name,
value: item.id
})
})
menuList[0].detailList = menuList[0].detailList.concat(channelCodes)
menuList[1].detailList = menuList[1].detailList.concat(productCodes)
menuList[2].detailList = menuList[2].detailList.concat(siteBrands)
uni.setStorageSync('filterData', this.menuList);
if (uni.getStorageSync('areaCodeList')) {
this.areaCodeList = uni.getStorageSync('areaCodeList')
}else{
} else {
this.areaCodeList = res.data.areaCodeList
}
// this.productCodeList = uni.getStorageSync('productCodeList')
// res.data.channelCodes.map(item => {
// this.menuList[0].detailList.push({
// title: item.name,
// value: item.id
// })
// })
// res.data.productCodes.map(item => {
// this.menuList[1].detailList.push({
// title: item.name,
// value: item.id
// })
// })
// res.data.siteBrands.map(item => {
// this.menuList[2].detailList.push({
// title: item.name,
// value: item.id
// })
// })
// // console.log(channelCodes, productCodes, siteBrands)
// this.$refs.slFilter.resetMenuList(this.menuList)
// this.$forceUpdate();
}
this.isFilterData = true
})
},
onSelected(e) {
@ -342,6 +379,7 @@
currentPage: this.currentPage,
pageSize: 10,
params: { //Object //
clientBelong:'ZHONGPIN',
sort: "juli", //String // ( price juli )
siteName: this.siteName,
...uni.getStorageSync('location'),
@ -352,11 +390,11 @@
.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,
comprehensiveSort:this.filterData.comprehensiveSort?this.filterData.comprehensiveSort:1
provinceCode: this.filterData.provinceCode,
cityCode: this.filterData.cityCode,
areaCode: this.filterData.areaCode,
distance: this.filterData.distance,
comprehensiveSort: this.filterData.comprehensiveSort ? this.filterData.comprehensiveSort : 1
}
}
@ -401,13 +439,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'
})
}
}

@ -1,7 +1,7 @@
<template>
<view class="bg-white page-content">
<view class="bg-img padding-bottom-lg flex align-center"
style="background-image: url(https://xoil-public.oss-cn-beijing.aliyuncs.com/baichuan_MP/wd-sz.png);height: 600upx;">
style="background-image: url(https://xoil-public.oss-cn-beijing.aliyuncs.com/baichuan_MP/bg-wg@ZP.png);height: 600upx;">
<view class="padding-xl margin-top bg-tm text-white top-part">
<view class="padding-xs padding-top-lg text-sm padding-top">
Hi{{(user.name?user.name:wxInfo.nickName)|nameKong}}师傅愿你开心每一天!
@ -126,7 +126,7 @@
<view 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>
<img :src="otherImgURL+'hb@ZP.png'" lazy-load class="png" mode="widthFix"></img>
</view>
</view>
<text>红包卡券</text>
@ -134,7 +134,7 @@
<view 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>
<img :src="otherImgURL+'hd@ZP.png'" lazy-load class="png" mode="widthFix"></img>
</view>
</view>
<text>活动通知</text>
@ -142,7 +142,7 @@
<view 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>
<img :src="otherImgURL+'tj@ZP.png'" lazy-load class="png" mode="widthFix"></img>
</view>
</view>
<text>推荐有礼</text>
@ -150,7 +150,7 @@
<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>
<img :src="otherImgURL+'sm@ZP.png'" lazy-load class="png" mode="widthFix"></img>
</view>
</view>
<text>操作说明</text>
@ -194,6 +194,7 @@
},
data() {
return {
otherImgURL: this.global.otherImgURL,
imgURL: this.global.imgURL ,
starUrl: this.global.starUrl,
isCompany: uni.getStorageSync('accountStatus'),

@ -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.110.99:38080'
// const productUrl = 'http://121.196.213.68/adminapi' //预生产
// const productUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new

Loading…
Cancel
Save