@@ -1,79 +1,103 @@
< template >
< div class = "public_container" : style= "{paddingTop:marginTop+ 'px'}" >
<!-- < van-pull-refresh v-model = "isLoading" @refresh="onRefresh" > - - >
< div class = "head" >
< van-swipe :autoplay = "3000" style = "width: 100%; " >
< van-swipe-item v-for = "(item, index) in activity" :key="index" @touchstart="touchstart" @touchmove="touchmove" @touchend="touchend(item)" >
< ! - - < img : src = "config.assetsUrl + item.img + '?v=' + thisGetTime" / > -- >
< img :src = "item.img" >
< / van-swipe-item >
< / van-swipe >
< / div >
< div class = "public_container" : style= "{ paddingTop: marginTop + 'px' }" >
<!-- < van-pull-refresh v-model = "isLoading" @refresh="onRefresh" > - - >
< div class = "head" >
< van-swipe :autoplay = "3000" style = "width: 100%" >
< van-swipe-item v-for = "(item, index) in activity" :key="index" @touchstart="touchstart" @touchmove="touchmove" @touchend="touchend(item)" >
< ! - - < img : src = "config.assetsUrl + item.img + '?v=' + thisGetTime" / > -- >
< img :src = "item.img" / >
< / van-swipe-item >
< / van-swipe >
< / div >
< div class = "iconPart1" >
< van-notice-bar :left-icon = "png8" : text= ' getCodeValue' / >
< / div >
< div class = "iconPart1" >
< van-notice-bar :left-icon = "png8" : text= " getCodeValue" / >
< / div >
< div class = "top" >
< div class = "menu" v-for = "(item, ind) in homePageIcon" :key="ind" @click="goDetail(item)" >
< div class = "menuImg" >
< img :src = "item.img" >
< / div >
< span class = "menuName" > { { item . title } } < / span >
< div class = "top" >
< div class = "menu" v-for = "(item, ind) in homePageIcon" :key="ind" @click="goDetail(item)" >
< div class = "menuImg" >
< img :src = "item.img" / >
< / div >
< span class = "menuName" > { { item . title } } < / span >
< / div >
< / div >
< div class = "cooperativeUnits" >
< div >
< div style = "width: 50%; display: inline-block" v-for = "(item, index) in list1" :key="index" >
< p
style = "
display: flex;
justify-content: flex-start;
height: 50px;
align-items: center;
margin: 5px 10px;
border: 1px solid #eee;
border-radius: 5px;
background: #fff;
color: #333333;
padding-left: 10px;
"
>
< img src = "@/assets/images/GBC/home-cooperativeUnits-icon.png" style = "width: 20px; height: 20px; margin-right: 10px" / >
{ { item . name } }
< / p >
< / div >
< / div >
< / div >
< div class = "cooperativeUnits " >
< div >
< div style = "width: 50%;display: inline-block;" v-for = "(item,index) in list1" :key="index" >
< p style = "display: flex;justify-content: flex-start;height: 50px;align-items: center;margin: 5px 10px;border:1px solid #eee;border-radius: 5px;background: #fff;color: #333333;padding-left: 10px;" >
< img src = "@/assets/images/GBC/home-cooperativeUnits-icon.png" style = "width: 20px;height: 20px;margin-right: 10px;" / >
{ { item . name } }
< / p >
< / div >
< / div >
< / div >
< div class = "companyProfile" >
< img :src = "image1" style = "width: 100%;" / >
< / div >
<!-- < / van-pull-refresh > -- >
< div class = "companyProfile " >
< img :src = "image1" style = "width: 100%" / >
< / div >
<!-- < / van-pull-refresh > -- >
< van-dialog v-model = "chooseProjectDialogShow" :showConfirmButton="false" >
< div slot = "title" >
< p style = "color: #E 9332E; " > 请选择项目 < / p >
< / div >
< div class = "chooseProjectDialog" style = "padding: 20px 30px 30px;font-size: 14px;height:425px;overflow-y:auto" >
< van-radio-group v-model = "chooseTeamCode" >
< van-radio v-for = "(item,index) in projectList" :key="index" :name="item.teamCode" style="margin: 10px;" >
< span style = "margin-left: 20px;" >
{ { item . projectName } }
< span v-if = "item.teamName" style="margin-left: 10px;color: #a7a7a7;" >
( {{ item.teamName }} )
< template slot = "title" >
< p style = "color: #e 9332e " > 请选择项目 < / p >
< / template >
< template >
< div class = "search-project-warpper" >
< van-search
v-model = "searchProjectName"
shape = "round"
background = "#fff"
@focus ="handleFocus"
@blur ="handleBlur"
@search ="searchProject"
placeholder = "请输入项目名称"
/ >
< van-dropdown-menu :overlay = "false" active -color = " # e9332e " >
< van-dropdown-item v-model = "searchProjectYear" :options="searchProjectYearOptions" get-container="body" @change="searchProject" / >
< / van-dropdown-menu >
< / div >
< div class = "chooseProjectDialog" >
< van-radio-group v-model = "chooseTeamCode" >
< van -radio v-for = "(item, index) in projectList" :key="index" :name="item.teamCode" style="margin: 10px" >
< span style = "margin-left: 20px" >
{ { item . projectName } }
< span v-if = "item.teamName" style="margin-left: 10px; color: #a7a7a7" >
{{ item.teamName }}
< / span >
< span v-if = "item.projectState" style="margin-left: 10px; color: #a7a7a7" > 状态 : {{ item.projectState = = = ' 1 ' ? ' 正常 ' : ' 失效 ' }} < / span >
< / span >
< /span >
< / van -radio>
< / van-radio-group >
< / div >
< div style = "text-align: center;margin -bo ttom: 30px;" >
< van-button round type = "danger" size = "small" style = "padding:0px 35px;font-size: 14px;" @click ="chooseProjectList" >
确定
< / van -button >
< / div >
< /van -radio >
< / van-radio-group >
< / div >
< div style = "text-align: center; margin-top: 20px; margin-bottom: 20px" >
< van-button round type = "danger" size = "small" style = "padding: 0px 80px; font-size: 14px" @click ="chooseProjectList" > 确定 < / van -bu tton >
< / div >
< / template >
< / van-dialog >
<!-- 选择过期项目弹窗提示 -- >
< van-dialog v-model = "enableProjectDialogShow" :showConfirmButton="false" >
< div slot = "title" >
< p style = "color: #E 9332E; " > 提示 < / p >
< p style = "color: #e 9332e " > 提示 < / p >
< / div >
< div style = "padding: 20px 30px 30px;font-size: 14px; " >
{ { chooseProjectName } } 项目服务时间已结束 !
< / div >
< div style = "text-align: center;margin-bottom: 30px;" >
< van-button round type = "danger" size = "small" style = "padding:0px 35px;font-size: 14px;" @click ="enableProjectDialogShow = false" >
返回
< / van -button >
< div style = "padding: 30px; font-size: 14px" > { { chooseProjectName } } 项目服务时间已结束 ! < / div >
< div style = "text-align: center; margin-bottom: 20px" >
< van-button round type = "danger" size = "small" style = "padding: 0px 80px; font-size: 14px" @click ="enableProjectDialogShow = false" > 返回 < / van -button >
< / div >
< / van-dialog >
< / div >
@@ -82,9 +106,9 @@
< script >
import { gbcProjectList , gbcProjectConfirm , homeConfigGBC } from '@/api/GBC/GBC'
import { getAgentInfo } from '@/api/ebiz/my/my.js'
import { Swipe , SwipeItem , NoticeBar , Icon , Popup , PullRefresh , Toast , RadioGroup , Radio } from 'vant'
import { Swipe , SwipeItem , NoticeBar , Icon , Popup , PullRefresh , Toast , RadioGroup , Radio , Search , DropdownMenu , DropdownItem } from 'vant'
import config from '@/config'
import png8 from '@/assets/YB_APP/images/8.png' ;
import png8 from '@/assets/YB_APP/images/8.png'
export default {
name : 'Home' ,
components : {
@@ -93,75 +117,94 @@ export default {
[ NoticeBar . name ] : NoticeBar ,
[ Icon . name ] : Icon ,
[ Popup . name ] : Popup ,
[ PullRefresh . name ] : PullRefresh ,
[ RadioGroup . name ] : RadioGroup ,
[ Radio . name ] : Radio ,
[ Toast . name ] : Toast ,
[ PullRefresh . name ] : PullRefresh ,
[ RadioGroup . name ] : RadioGroup ,
[ Radio . name ] : Radio ,
[ Toast . name ] : Toast ,
[ Search . name ] : Search ,
[ DropdownMenu . name ] : DropdownMenu ,
[ DropdownItem . name ] : DropdownItem
} ,
data ( ) {
return {
config ,
marginTop : '80' ,
getCodeValue : '' ,
marginTop : '80' ,
getCodeValue : '' ,
png8 ,
activity : [ ] ,
homePageIcon : [
{ title : '建议书' , route : '/proposal/list' , img : require ( '@/assets/images/GBC/home-menu-1.png' ) } ,
{ title : '电子投保' , route : '/sale/list' , img : require ( '@/assets/images/GBC/home-menu-2.png' ) } ,
{ title : '海报设计' , route : '/poster/posterList' , img : require ( '@/assets/images/GBC/home-menu-3.png' ) } ,
{ title : 'GBC专区' , route : '/GBC/projectList' , img : require ( '@/assets/images/GBC/home-menu-4.png' ) }
homePageIcon : [
{ title : '建议书' , route : '/proposal/list' , img : require ( '@/assets/images/GBC/home-menu-1.png' ) } ,
{ title : '电子投保' , route : '/sale/list' , img : require ( '@/assets/images/GBC/home-menu-2.png' ) } ,
{ title : '海报设计' , route : '/poster/posterList' , img : require ( '@/assets/images/GBC/home-menu-3.png' ) } ,
{ title : 'GBC专区' , route : '/GBC/projectList' , img : require ( '@/assets/images/GBC/home-menu-4.png' ) }
] ,
isLoading : false ,
image1 : require ( '@/assets/images/GBC/home-companyProfile.png' ) ,
list1 : [
{ name : '广西金融投资集团' } , { name : '广投集团' } , { name : '广西北部湾银行' } , { name : '国海证券' } ,
] ,
projectList : [ ] ,
list1 : [ { name : '广西金融投资集团' } , { name : '广投集团' } , { name : '广西北部湾银行' } , { name : '国海证券' } ] ,
projectList : [ ] ,
chooseProjectDialogShow : false ,
chooseTeamCode : '' ,
chooseProjectCode : '' ,
chooseTeamCode : '' ,
chooseProjectCode : '' ,
chooseProjectName : '' ,
enableProjectDialogShow : false ,
searchProjectName : '' , // 搜索项目名称
searchProjectYear : '' // 搜索项目年份
}
} ,
mounted ( ) {
computed : {
searchProjectYearOptions ( ) {
let currentYear = new Date ( ) . getFullYear ( )
let options = [
{
text : '全部' ,
value : ''
}
]
// 从2024年开始, 到当前年份结束
for ( let i = 2024 ; i <= currentYear ; i ++ ) {
options . push ( {
text : i + '年' ,
value : i
} )
}
return options
}
} ,
mounted ( ) {
this . homeConfigGBC ( )
this . setMarginTop ( )
if ( this . $route . query . isFrom == 'login' ) {
if ( this . $route . query . isFrom == 'login' ) {
this . gbcProjectList ( )
}
this . getAgentInfo ( )
} ,
methods : {
getAgentInfo ( ) {
let params = {
}
getAgentInfo ( params ) . then ( res => {
if ( res . result == '0 ') {
if ( res . branchType == '13' ) {
window . localStorage . setItem ( 'branchType' , '13' )
methods : {
getAgentInfo ( ) {
let params = { }
getAgentInfo ( params ) . then ( ( res ) => {
if ( res . result == '0' ) {
if ( res . branchType == '13' ) {
window . localStorage . setItem ( 'branchType ', '13' )
}
} else {
this . $toast ( res . resultMessage )
}
} )
} ,
gbcProjectList ( ) {
let params = {
}
gbcProjectList ( params ) . then ( res => {
if ( res . result == '0' ) {
gbcProjectList ( ) {
let params = { }
gbcProjectList ( params ) . then ( ( res ) => {
if ( res . result == '0' ) {
this . projectList = res . content
if ( this . projectList . length == 1 ) {
if ( this . projectList . length == 1 ) {
this . chooseProjectDialogShow = false
this . chooseTeamCode = this . projectList [ 0 ] . teamCode
this . chooseProjectCode = this . projectList [ 0 ] . projectCode
this . chooseProjectName = this . projectList [ 0 ] . projectName
this . chooseProjectList ( )
}
if ( this . projectList . length > 1 ) {
if ( this . projectList . length > 1 ) {
this . chooseProjectDialogShow = true
}
} else {
@@ -170,25 +213,42 @@ export default {
} )
} ,
choose ProjectList ( ) {
if ( ! this . chooseTeamCode ) {
search Project( ) {
let params = {
projectName : this . searchProjectName ,
projectYear : this . searchProjectYear
}
gbcProjectList ( params ) . then ( ( res ) => {
if ( res . result == '0' ) {
this . chooseTeamCode = ''
this . chooseProjectCode = ''
this . chooseProjectName = ''
this . projectList = res . content
} else {
this . $toast ( res . resultMessage )
}
} )
} ,
chooseProjectList ( ) {
if ( ! this . chooseTeamCode ) {
this . $toast ( '请选择项目' )
return false
}
if ( this . projectList && this . projectList . length != 0 ) {
this . projectList . forEach ( item => {
if ( item . teamCode == this . chooseTeamCode ) {
if ( this . projectList && this . projectList . length != 0 ) {
this . projectList . forEach ( ( item ) => {
if ( item . teamCode == this . chooseTeamCode ) {
this . chooseProjectName = item . projectName
}
} )
}
let params = {
teamCode : this . chooseTeamCode
teamCode : this . chooseTeamCode
}
gbcProjectConfirm ( params ) . then ( res => {
if ( res . result == '0' ) {
if ( res . content . enable == 1 ) {
gbcProjectConfirm ( params ) . then ( ( res ) => {
if ( res . result == '0' ) {
if ( res . content . enable == 1 ) {
this . chooseProjectDialogShow = false
} else {
this . enableProjectDialogShow = true
@@ -198,21 +258,21 @@ export default {
}
} )
} ,
goDetail ( data ) {
goDetail ( data ) {
this . $jump ( {
flag : 'h5' ,
extra : {
url : location . origin + '/#' + data . route ,
url : location . origin + '/#' + data . route
} ,
routerInfo : {
path : data . route ,
} ,
path : data . route
}
} )
} ,
setMarginTop ( ) {
EWebBridge . webCallAppInJs ( " top_bar_height" ) . then ( data => {
console . log ( data , 'top_bar_height' )
if ( data ) {
setMarginTop ( ) {
EWebBridge . webCallAppInJs ( ' top_bar_height' ) . then ( ( data ) => {
console . log ( data , 'top_bar_height' )
if ( data ) {
// 获取高度成功
let height = data . height
// 设置高度
@@ -220,43 +280,41 @@ export default {
}
} )
} ,
homeConfigGBC ( ) {
let params = {
}
homeConfigGBC ( params ) . then ( res => {
if ( res . result == 0 ) {
homeConfigGBC ( ) {
let params = { }
homeConfigGBC ( params ) . then ( ( res ) => {
if ( res . result == 0 ) {
this . activity = res . content . activity
if ( res . content . getCodeValue . length != 0 ) {
res . content . getCodeValue . forEach ( item => {
if ( res . content . getCodeValue . length != 0 ) {
res . content . getCodeValue . forEach ( ( item ) => {
this . getCodeValue += item + ' '
} )
}
this . homePageIcon = res . content . icon . homePageIcon
} else {
} else {
this . $toast ( res . resultMessage )
}
} )
} ,
touchstart ( ) {
touchstart ( ) {
this . clickFlag = true
} ,
touchmove ( ) {
touchmove ( ) {
this . clickFlag = false
} ,
touchend ( data ) {
if ( this . clickFlag ) {
touchend ( data ) {
if ( this . clickFlag ) {
let dataURL = JSON . parse ( data . route ) . extra . url
if ( dataURL ) {
let thisRoute = dataURL . substring ( dataURL . lastIndexOf ( " /#" ) + 2 )
if ( dataURL ) {
let thisRoute = dataURL . substring ( dataURL . lastIndexOf ( ' /#' ) + 2 )
this . $jump ( {
flag : 'h5' ,
extra : {
url : location . origin + '/#' + thisRoute ,
url : location . origin + '/#' + thisRoute
} ,
routerInfo : {
path : thisRoute ,
} ,
path : thisRoute
}
} )
}
}
@@ -264,12 +322,12 @@ export default {
// 下拉刷新
onRefresh ( ) {
setTimeout ( ( ) => {
Toast ( '刷新成功' ) ;
this . isLoading = false ;
location . reload ( )
} , 1000 ) ;
} ,
} ,
Toast ( '刷新成功' )
this . isLoading = false
location . reload ( )
} , 1000 )
}
}
// beforeRouteEnter(to, from, next) {
// next(vm => {
// if(from && from.path){
@@ -284,85 +342,134 @@ export default {
}
< / script >
< style lang = "scss" scoped >
. public _container {
font - size : 12 px ;
height : 100 vh ;
width : 100 vw ;
/*background-image: url("../../assets/YB_APP/images/2-1.png");*/
/*background-repeat: no-repeat;*/
/*background-size: contain;*/
background : # F0F8FF ;
}
. head {
position : relative ;
margin : 10 px ; border - radius : 5 px ;
/*box-shadow: 0px 5px 8px 0px #7a6fc1;*/
img {
width : 100 % ;
height : 100 % ;
border - radius : 5 px ;
}
/ deep / . van - swipe - item {
height : auto ;
}
}
/ deep / . van - notice - bar {
border - radius : 5 px ;
}
. menuImg {
width : 100 % ; display : flex ; justify - content : center ; margin - bottom : 5 px ;
/deep/ img {
width : 30 px ;
height : 30 px ;
}
}
/ deep / . van - notice - bar {
background : # fff ;
color : # 333 ;
letter - spacing : 1 px ;
}
/ deep / . van - icon _ _image {
. public _container {
font - size : 12 px ;
height : 100 vh ;
width : 100 vw ;
/*background-image: url("../../assets/YB_APP/images/2-1.png");*/
/*background-repeat: no-repeat;*/
/*background-size: contain;*/
background : # f0f8ff ;
}
. head {
position : relative ;
margin : 10 px ;
border - radius : 5 px ;
/*box-shadow: 0px 5px 8px 0px #7a6fc1;*/
img {
width : 100 % ;
}
/ deep / . van - notice - bar _ _left - icon {
width : 50 px ;
}
/ deep / . van - notice - bar _ _wrap {
margin - left : 10 px ;
}
/ deep / . van - swipe - item {
img {
height : 145 px ;
}
}
. iconPart1 {
margin : 10 px ; border - radius : 5 px ;
}
. top {
display : flex ;
justify - content : space - between ;
margin : 10 px ;
height : 100 % ;
border - radius : 5 px ;
align - items : center ;
padding : 15 px ;
}
. titl e- img {
height : 40 px ;
/ deep / . van - swip e- ite m {
height : auto ;
}
/ deep / . chooseProjectDialog {
. van - radio _ _icon {
. van - icon {
border : 1 px solid red ;
}
}
/deep/ . van - notice - bar {
border - radius : 5 px ;
}
. menuImg {
width : 100 % ;
display : flex ;
justify - content : center ;
margin - bottom : 5 px ;
/deep/ img {
width : 30 px ;
height : 30 px ;
}
}
/deep/ . van - notice - bar {
background : # fff ;
color : # 333 ;
letter - spacing : 1 px ;
}
/deep/ . van - icon _ _image {
width : 100 % ;
}
/deep/ . van - notice - bar _ _left - icon {
width : 50 px ;
}
/deep/ . van - notice - bar _ _wrap {
margin - left : 10 px ;
}
/deep/ . van - swipe - item {
img {
height : 145 px ;
}
}
. iconPart1 {
margin : 10 px ;
border - radius : 5 px ;
}
. top {
display : flex ;
justify - content : space - between ;
margin : 10 px ;
border - radius : 5 px ;
align - items : center ;
padding : 15 px ;
}
. title - img {
height : 40 px ;
}
/deep/ . van - dialog {
// top: calc(100vh - 300px);
top : 55 % ;
& _ _header {
padding - top : 20 px ;
}
}
/deep/ . chooseProjectDialog {
height : calc ( 100 vh - 400 px ) ;
min - height : 300 px ;
padding : 0 15 px ;
font - size : 14 px ;
overflow - y : auto ;
. van - radio _ _icon {
. van - icon {
border : 1 px solid red ;
}
}
. cooperativeUnits {
background : url ( "../../assets/images/GBC/home- cooperativeUnits.png" ) ;
background - repeat : no - re peat;
background - size : cover ;
height : 130 px ;
padding - top : 6 0px ;
margin : 1 0px ;
border - radius : 10 px ;
}
. cooperativeUnits {
background : url ( '../../assets/images/GBC/home-coo per ativeUnits.png' ) ;
background - repeat : no - repeat ;
background - size : cover ;
height : 13 0px ;
padding - top : 6 0px ;
margin : 10 px ;
border - radius : 10 px ;
}
. search - project - warpper {
display : flex ;
align - items : center ;
padding : 10 px 15 px 0 ;
/deep/ . van - search {
flex - grow : 1 ;
padding : 0 ;
}
/ deep / . van - dropdown - menu {
min - width : 60 px ;
flex - shrink : 0 ;
}
/ deep / . van - hairline -- top - bottom : : after {
display : none ;
}
/ deep / . van - dropdown - item -- down {
top : calc ( 50 px + 56 px ) ! important ; // 标题栏+搜索框
}
/ deep / . van - button -- small {
width : 200 px ;
}
}
< / style >