@@ -1,7 +1,9 @@ | |||
import { envs } from '@/utils/network/api.js' | |||
import { | |||
envs | |||
} from '@/utils/network/api.js' | |||
// export const fileURL = 'http://47.94.96.52/' | |||
// export const fileURL = 'http://222.85.144.89:19002/default-bucket/' | |||
export const downloadFileURL = envs[process.env.NODE_ENV].baseUrl +'/user-export-excel/' | |||
export const fileURL = envs[process.env.NODE_ENV].baseUrl +'/default-bucket/' | |||
export const fileURLList = envs[process.env.NODE_ENV].baseUrl | |||
export const downloadFileURL = envs[process.env.NODE_ENV].baseUrl + '/user-export-excel/' | |||
export const fileURL = envs[process.env.NODE_ENV].baseUrl + '/default-bucket/' | |||
export const fileURLList = envs[process.env.NODE_ENV].baseUrl + "/" |
@@ -3,12 +3,14 @@ | |||
"pages": [{ | |||
"path": "pages/index/index", | |||
"style": { | |||
"navigationBarHidden": true, | |||
// "navigationBarHidden": true, | |||
"navigationBarTitleText": "首页", | |||
"navigationBarBackgroundColor": "#22dbc8", | |||
"navigationStyle": "custom", | |||
"mp-alipay": { //在支付宝小程序中如果不生效 就加上这两行代码 就会生效啦 | |||
"transparentTitle": "always", | |||
"titlePenetrate": "YES" | |||
"titlePenetrate": "YES", | |||
"defaultTitle": "" // 将导航栏默认的 title 置空 | |||
} | |||
} | |||
}, |
@@ -1,4 +1,5 @@ | |||
<template> | |||
<navBar title="首页" :scrollTop="scrollTop" :isBack="isBack"></navBar> | |||
<filter> | |||
<!-- <view class="statusBar" :style="{height:statusBarHeight+'px'}" v-show="isShowBar"></view> --> | |||
<view class="wrapper"> | |||
@@ -9,15 +10,16 @@ | |||
indicator-active-color="rgba(0, 179, 139, 1)" :easing-function="swiper.easing"> | |||
<block v-if="state.swiperList.length >0" v-for="item in state.swiperList" :key="item.id"> | |||
<swiper-item class="swiper-item" @click="link(item)"> | |||
<image :src="item.imgUrl?strReplace(item.imgUrl):fileURL + 'image/index/banner-1.png'" | |||
mode="widthFix"></image> | |||
<!-- <image :src="item.imgUrl?strReplace(item.imgUrl):fileURL + 'image/index/banner-1.png'" | |||
mode="widthFix"></image> --> | |||
<image :src="fileURLList + item.imgUrl" mode="widthFix"></image> | |||
</swiper-item> | |||
</block> | |||
<block> | |||
<!-- <block> | |||
<swiper-item class="swiper-item"> | |||
<image :src="fileURL + 'image/index/banner-1.png'" mode="widthFix"></image> | |||
<image :src="fileURLList + 'image/index/banner-1.png'" mode="widthFix"></image> | |||
</swiper-item> | |||
</block> | |||
</block> --> | |||
</swiper> | |||
<view class="notice"> | |||
@@ -250,7 +252,7 @@ | |||
reactive | |||
} from "vue"; | |||
import { | |||
fileURL | |||
fileURL, fileURLList | |||
} from "@/datas/fileURL.js"; | |||
import { | |||
navTo, | |||
@@ -259,12 +261,13 @@ | |||
import { | |||
getCodeName | |||
} from "@/datas/queryKey.js"; | |||
import navBar from "@/components/nav-bar/nav-bar2.vue"; | |||
const tools = require("../../static/etcUtil/tools.js"); | |||
const bgOrange = `url(${fileURL}image/index/bg-orange.png) center center no-repeat`; | |||
const bgBlue = `url(${fileURL}image/index/bg-blue.png) center center no-repeat`; | |||
const list = reactive(["您有一条待办事项,还未办理完成"]) | |||
const scrollTop = ref(0); | |||
const isBack = ref(false); | |||
const swiper = reactive({ | |||
indicatorDots: true, | |||
autoplay: true, | |||
@@ -321,6 +324,7 @@ | |||
} else { | |||
isShowBar.value = false; | |||
} | |||
scrollTop.value = e.scrollTop; | |||
}); | |||
onLoad(() => { | |||
getInfo(); |
@@ -3,7 +3,7 @@ | |||
<navBar title="九州ETC"></navBar> | |||
<view class="search-box"> | |||
<image :src="`${$imgUrl}service/icon-search.png`" class="icon" mode="aspectFill" @click="search()"></image> | |||
<input class="search" placeholder="请输入业务名称" v-model="state.searchVal" @confirm="search()"/> | |||
<input class="search" placeholder="请输入业务名称" v-model="state.searchVal" @confirm="search()" /> | |||
</view> | |||
<view class="content"> | |||
<view class="left"> | |||
@@ -16,9 +16,10 @@ | |||
<view class="right"> | |||
<view class="right-content"> | |||
<block v-if="menuShow.list.length > 0"> | |||
<view v-for="(item,index) in menuShow.list[tableSelectIndex].children" :key='index' class="item-box" @click="toNext(item.link)"> | |||
<view v-for="(item,index) in menuShow.list[tableSelectIndex].children" :key='index' | |||
class="item-box" @click="toNext(item.link)"> | |||
<view class="item bg-blue" :style="{ '--background': bgBlue }"> | |||
<image :src="`${fileURLList}${item.iconPath}`" mode="aspectFill"/> | |||
<image :src="`${fileURLList}${item.iconPath}`" mode="aspectFill" /> | |||
<!-- <image :src="`${item.iconPath}`" /> --> | |||
</view> | |||
<view class="text">{{item.name}}</view> | |||
@@ -39,7 +40,7 @@ | |||
onLoad | |||
} from "@dcloudio/uni-app"; | |||
import { | |||
fileURL,fileURLList | |||
fileURL, fileURLList | |||
} from "@/datas/fileURL.js"; | |||
import { | |||
msg | |||
@@ -71,55 +72,55 @@ | |||
list: [] //请求的真正的不会变得 | |||
}); | |||
const menuShow = reactive({ | |||
list: [] ,//展示的 | |||
list: [],//展示的 | |||
}); | |||
const state = reactive({ | |||
searchVal:'', //input输入值 | |||
newArr:[] | |||
const state = reactive({ | |||
searchVal: '', //input输入值 | |||
newArr: [] | |||
}); | |||
onLoad(() => { | |||
queryMenuConfigAction().then((val : any) => { | |||
menu.list = val.menuList?val.menuList:[], | |||
menu.list=deepClone(menu.list) | |||
state.newArr=deepClone(menu.list); | |||
menuShow.list = val.menuList?val.menuList:[] | |||
menu.list = val.menuList ? val.menuList : [], | |||
menu.list = deepClone(menu.list) | |||
state.newArr = deepClone(menu.list); | |||
menuShow.list = val.menuList ? val.menuList : [] | |||
}) | |||
}); | |||
// 深拷贝 | |||
const deepClone=(obj)=> { | |||
if (typeof obj !== 'object' || obj === null) { | |||
return obj; | |||
} | |||
let clone = Array.isArray(obj) ? [] : {}; | |||
for (let key in obj) { | |||
if (obj.hasOwnProperty(key)) { | |||
clone[key] = deepClone(obj[key]); | |||
} | |||
} | |||
return clone; | |||
const deepClone = (obj) => { | |||
if (typeof obj !== 'object' || obj === null) { | |||
return obj; | |||
} | |||
let clone = Array.isArray(obj) ? [] : {}; | |||
for (let key in obj) { | |||
if (obj.hasOwnProperty(key)) { | |||
clone[key] = deepClone(obj[key]); | |||
} | |||
} | |||
return clone; | |||
} | |||
const search=()=>{ | |||
for(var i=0;i<menu.list.length;i++){ | |||
state.newArr[i]['children']=[]; | |||
for(var j=0;j<menu.list[i]['children'].length;j++){ | |||
const name=menu.list[i]['children'][j].name; | |||
if(name.indexOf(state.searchVal)>=0){ | |||
const search = () => { | |||
for (var i = 0; i < menu.list.length; i++) { | |||
state.newArr[i]['children'] = []; | |||
for (var j = 0; j < menu.list[i]['children'].length; j++) { | |||
const name = menu.list[i]['children'][j].name; | |||
if (name.indexOf(state.searchVal) >= 0) { | |||
state.newArr[i]['children'].push(menu.list[i]['children'][j]) | |||
} | |||
} | |||
} | |||
// 清除没有孩子的父亲 | |||
const lastArr=[] | |||
for(var k=0;k<state.newArr.length;k++){ | |||
if(state.newArr[k]['children'].length!=0){ | |||
const lastArr = [] | |||
for (var k = 0; k < state.newArr.length; k++) { | |||
if (state.newArr[k]['children'].length != 0) { | |||
lastArr.push(state.newArr[k]) | |||
} | |||
} | |||
console.log("lastArr",lastArr) | |||
menuShow.list=lastArr | |||
console.log("lastArr", lastArr) | |||
menuShow.list = lastArr | |||
} | |||
const queryMenuConfigAction = () => { | |||
var data = { | |||
@@ -137,7 +138,7 @@ | |||
return new Promise(async (resolve, reject) => { | |||
const res = await request(queryMenuConfig, options); | |||
const data = stringToJson(res.bizContent); | |||
console.log("data",data.menuList) | |||
console.log("data", data.menuList) | |||
resolve(data); | |||
}).catch((error) => { | |||
reject(error); | |||
@@ -186,6 +187,7 @@ | |||
padding: 0 10rpx; | |||
font-size: 28rpx; | |||
color: black; | |||
background: transparent; | |||
} | |||
.content { | |||
@@ -244,15 +246,30 @@ | |||
flex-wrap: wrap; | |||
} | |||
// #ifdef MP-ALIPAY | |||
.item { | |||
width: 95rpx; | |||
height: 95rpx; | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
border-radius: 20rpx; | |||
} | |||
.right .item-box { | |||
display: flex; | |||
flex-direction: column; | |||
justify-content: center; | |||
align-items: center; | |||
margin-right: 30rpx; | |||
margin-right: 26rpx; | |||
margin-bottom: 39rpx; | |||
} | |||
// #endif | |||
// #ifdef MP-WEIXIN | |||
.item { | |||
width: 105rpx; | |||
height: 105rpx; | |||
@@ -262,6 +279,16 @@ | |||
border-radius: 20rpx; | |||
} | |||
.right .item-box { | |||
display: flex; | |||
flex-direction: column; | |||
justify-content: center; | |||
align-items: center; | |||
margin-right: 30rpx; | |||
margin-bottom: 39rpx; | |||
} | |||
// #endif | |||
.item image { | |||
width: 64rpx; | |||
height: 64rpx; |
@@ -70,8 +70,8 @@ | |||
serviceType: state.businessTypeVal, | |||
startDate: state.range[0], | |||
endDate: state.range[1], | |||
pageNo: state.pageNo, | |||
pageSize: state.pageSize, | |||
// pageNo: state.pageNo, | |||
// pageSize: state.pageSize, | |||
}; | |||
} else { | |||
var data = { |
@@ -16,7 +16,7 @@ | |||
<image v-if="!state.form.vehPosImgUrl" class="icon" :src="`${$imgUrl}applyCard/car-zhu.png`"> | |||
</image> | |||
<image v-else class="icon" :src="state.form.vehPosImgUrl"></image> | |||
<image v-else class="icon" :src="strReplace(state.form.vehPosImgUrl)"></image> | |||
</view> | |||
</view> | |||
<view class="picture-wrapper" @click="cardImageOcr('2')"> | |||
@@ -30,7 +30,7 @@ | |||
</view> | |||
<image v-if="!state.form.vehNegImgUrl" class="icon" :src="`${$imgUrl}applyCard/car-fu.png`"> | |||
</image> | |||
<image v-else class="icon" :src="state.form.vehNegImgUrl"></image> | |||
<image v-else class="icon" :src="strReplace(state.form.vehNegImgUrl)"></image> | |||
</view> | |||
</view> | |||
<view class="picture-wrapper" @click="cardFileImageUpdate()"> | |||
@@ -44,7 +44,7 @@ | |||
</view> | |||
<image v-if="!state.form.vehBodyUrl" class="icon" :src="`${$imgUrl}applyCard/chetou.png`"> | |||
</image> | |||
<image v-else class="icon" :src="state.form.vehBodyUrl"></image> | |||
<image v-else class="icon" :src="strReplace(state.form.vehBodyUrl)"></image> | |||
</view> | |||
</view> | |||
<view class="shibie-wrapper"> | |||
@@ -126,6 +126,7 @@ | |||
etcCarOcrCard, | |||
fileUpload, | |||
changeCarInfo, | |||
envs | |||
} from "@/utils/network/api.js"; | |||
import { | |||
request | |||
@@ -141,7 +142,11 @@ | |||
let cacachCarid='' | |||
const strReplace = (str : string) => { | |||
let imgUrl = str.replace("http://192.168.101.145:9000", envs[process.env.NODE_ENV].baseUrl); | |||
imgUrl = imgUrl.replace("http://100.64.2.113:9000", envs[process.env.NODE_ENV].baseUrl); | |||
return imgUrl; | |||
}; | |||
// 修改 | |||
const savaHandle = () => { | |||
state.form.vehicleId=cacachCarid |