Commit b33f0612 authored by linxin's avatar linxin

Merge branch 'develop' of https://hel.hand-china.com/xugong/hls-xcmg-vue-app into develop

parents 8977b2d7 44a73354
/*
* @Description: In User Settings Edit
* @Author: your name
* @Date: 2019-09-24 12:34:06
* @LastEditTime: 2019-09-24 12:34:06
* @LastEditors: your name
*/
export default {
bannerList: [
{
......
/*
* @Description: In User Settings Edit
* @Author: your name
* @Date: 2019-09-24 12:34:06
* @LastEditTime: 2019-10-15 11:13:36
* @LastEditors: Please set LastEditors
*/
export default {
bannerList: [
// {
// pictureUrl: require('../assets/image/home/bannerWrap@2x.png'),
// },
// {
// pictureUrl: require('../assets/image/home/bannerWrap2@2x.png'),
// },
],
moduleSeparateList: [
{
'moduleId': 1,
'moduleCode': 'PARTNER',
'moduleName': '产品查询',
'moduleIcon': require('@/assets/homePage/product-select.png'),
'roleId': 1,
'roleCode': 'ADMIN',
'roleName': '管理员',
},
{
'moduleId': 2,
'moduleCode': 'PROJECT',
'moduleName': '产品试算',
'moduleIcon': require('@/assets/homePage/product-trial.png'),
'roleId': 1,
'roleCode': 'ADMIN',
'roleName': '管理员',
},
{
'moduleId': 3,
'moduleCode': 'CONTRACT',
'moduleName': '合同查询',
'moduleIcon': require('@/assets/homePage/contract-query.png'),
'roleId': 1,
'roleCode': 'ADMIN',
'roleName': '管理员',
},
{
'moduleId': 4,
'moduleCode': 'PERSONAL',
'moduleName': '还款计划',
'moduleIcon': require('@/assets/homePage/replay.png'),
'roleId': 1,
'roleCode': 'ADMIN',
'roleName': '管理员',
},
],
}
......@@ -2,7 +2,7 @@
* @Descrip: 主页
* @Author: your name
* @Date: 2019-10-10 14:25:15
* @LastEditTime: 2019-10-14 13:57:37
* @LastEditTime: 2019-10-15 15:02:01
* @LastEditors: Please set LastEditors
-->
<template>
......@@ -11,7 +11,7 @@
<div slot="left" class="h-header-btn">
<!-- <i class="ion-ios-arrow-back" /> -->
<img class="locations" src="@/assets/homePage/location.png" alt="" @click="location">
<span>{{ city }}</span>
<span class="home-city">{{ city }}</span>
</div>
<div slot="center" @click="getLocation">徐工租赁</div>
</h-header>
......@@ -24,11 +24,21 @@
<img src="@/assets/homePage/banner2.png" alt="">
</swipe-item>
</swipe>
<div class="function">
<div class="functions">
<function-item
v-for="(item,index) in functionList" :key="index" :functionIcon="item.functionIcon"
:functionName="item.functionName"
:data="item" class="function-item vue-1px" @clickFunction="goFunctionHome"/>
v-for="item in moduleSeparateList.slice(0,4)" :key="item.moduleId" :functionIcon="item.moduleIcon"
:functionName="item.moduleName"
:data="item" @clickFunction="goModuleFunction"/>
</div>
<div class="middle-box">
<header>常用应用</header>
<div class="function">
<function-item
v-for="(item,index) in functionList" :key="index" :functionIcon="item.functionIcon"
:functionName="item.functionName"
:data="item" class="function-item vue-1px" @clickFunction="goFunctionHome"/>
</div>
</div>
<div class="center-pic">
<div class="left-pic">
......@@ -69,33 +79,43 @@
</h-view>
</template>
<script>
import functionState from './functionState'
export default {
name: 'HomePage',
data () {
return {
city: '',
province: '',
user_bp_status: '',
user_bp_class: '',
bp_id: '',
moduleSeparateList: [],
functionList: [
{
functionIcon: require('@/assets/homePage/product-select.png'),
functionName: '产品查询',
functionIcon: require('@/assets/userBind/np.png'),
functionName: '用户绑定',
functionState: 'UserBind',
},
{
functionIcon: require('@/assets/homePage/product-trial.png'),
functionName: '产品试算',
functionIcon: require('@/assets/intoApproval/introduce.png'),
functionName: '绑定查询',
functionState: 'NaturePersonReadOnly',
},
{
functionIcon: require('@/assets/homePage/contract-query.png'),
functionName: '合同查询',
functionIcon: require('@/assets/intoApproval/introduce.png'),
functionName: '进件审批',
functionState: 'IntoList',
},
{
functionIcon: require('@/assets/homePage/replay.png'),
functionName: '还款计划',
functionIcon: require('@/assets/intoApproval/introduce.png'),
functionName: '经销商签约',
functionState: 'ContractList',
},
{
functionIcon: require('@/assets/intoApproval/introduce.png'),
functionName: '合同签约',
functionState: 'ContractSigning',
},
],
}
},
......@@ -104,6 +124,14 @@ export default {
created () {
this.getLocation()
},
beforeRouteEnter (to, from, next) {
next(vm => {
// if (from.name === 'Login') {
vm.moduleSeparateList = [...functionState.moduleSeparateList]
vm.userQuery()
// }
})
},
methods:
{
// 定位
......@@ -128,29 +156,37 @@ export default {
}, {enableHighAccuracy: true})
},
goFunctionHome (data) {
// if (data.functionState === 'NaturePersonReadOnly') {
// if (this.user_bp_status === 'APPROVED' && this.user_bp_class === 'NP') {
// this.$router.push({
// name: 'NaturePersonReadOnly',
// params: {
// 'bp_id': this.bp_id,
// },
// })
// } else if (this.user_bp_status === 'APPROVED' && this.user_bp_class === 'ORG') {
// this.$router.push({
// name: 'EnterpriseReadOnly',
// params: {
// 'bp_id': this.bp_id,
// },
// })
// } else {
// this.hlsPopup.showLongCenter('您的绑定申请还在流程中')
// }
// } else {
// this.$router.push({
// name: data.functionState,
// })
// }
if (data.functionState === 'NaturePersonReadOnly') {
if (this.user_bp_status !== 'APPROVING' && this.user_bp_class === 'NP') {
this.$router.push({
name: 'NaturePersonReadOnly',
params: {
'bp_id': this.bp_id,
},
})
} else if (this.user_bp_status !== 'APPROVING' && this.user_bp_class === 'ORG') {
this.$router.push({
name: 'EnterpriseReadOnly',
params: {
'bp_id': this.bp_id,
},
})
} else {
this.hlsPopup.showLongCenter('您的绑定申请还在流程中')
}
} else {
this.$router.push({
name: data.functionState,
})
}
},
goModuleFunction (data) {
console.log('........', data)
if (data.moduleId === 1) {
this.$router.push({
name: 'QueryHome',
})
}
},
location () {
this.$router.push({
......@@ -161,15 +197,114 @@ export default {
},
})
},
// 用户信息查询
userQuery () {
let vm = this
let url = $config.basePath + 'user_query'
let param = {
'phone': window.localStorage.getItem('user_phone'),
}
vm.$post(url, param).then(function (res) {
if (res.result === 'S') {
vm.user_bp_status = res.info.user_bp_status
vm.user_bp_class = res.info.user_bp_class
vm.bp_id = res.info.user_bp_id
}
})
},
},
}
</script>
<style lang='less' scoped>
@import "../../styles/vue-1px";
#homePage {
.h-header .h-header-left .h-header-btn:first-of-type {
.home-city {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.h-header .h-header-left .h-header-btn:first-of-type {
padding-left: 0.2rem;
}
.functions {
height: 82px;
width: 100%;
background: #fff;
padding-top: 10px;
display: flex;
justify-content: space-between;
&:before {
content: ''
}
&:after {
content: ''
}
.function-item {
text-align: center;
}
}
.middle-box {
margin-top: 8px;
background: white;
header {
height: 33px;
display: flex;
align-items: center;
line-height: 100%;
color: #5D98F6;
position: relative;
&:before {
content: '';
width: 4px;
height: 15px;
margin-right: 9px;
margin-left: 10px;
background-image: linear-gradient(-180deg, #5D98F6 0%, #76BCEE 100%);
border-radius: 2px;
}
&:after {
.setBottomLine()
}
span {
font-size: 12px;
color: #878A8D;
position: absolute;
right: 15px;
}
}
.function{
display: flex;
flex-wrap: wrap;
.function-item {
width: 25%;
height: 89px;
font-size: 12px;
// border: 1px solid rgba(169,169,169,0.1); /*no*/
/deep/ img {
height: 30px;
width: 30px;
margin: 23px 28px 9px 33px;
}
&:before {
.setBottomLine();
}
&:after {
.setRightLine();
}
}
}
}
.h-header .h-header-center div{
text-align: left!important;
}
......
This diff is collapsed.
<!--
* @Descrip: 查询首页
* @Author: your name
* @Date: 2019-10-15 14:30:00
* @LastEditTime: 2019-10-15 15:54:08
* @LastEditors: Please set LastEditors
-->
<template>
<h-view id="query" class="public-style" title="产品查询">
<h-header :proportion="[5,1,1]" class="bar-custom">
<div slot="left" class="h-header-btn">
<img src="@/assets/userBind/arrow.png" @click="$routeGo()">
<span>产品信息</span>
</div>
</h-header>
<h-content>
<div class="hinput">
<div class="search-box">
<input type="text" placeholder="请输入产品类别/产品线">
<img src="@/assets/distributorSign/search.png" alt="">
</div>
</div>
<div class="box">
<div class="first">
<img src="@/assets/productQuery/product-query.png" alt="">
<p class="product-class">产品类别</p>
<p class="product">装载机械</p>
</div>
<div class="second">
<p class="product-class">产品线</p>
<p class="product">轮式装载机</p>
<img src="@/assets/productQuery/pull.png" alt="">
</div>
<img class="arrow" src="@/assets/productQuery/getIn.png" alt="">
</div>
<div class="box">
<div class="first">
<img src="@/assets/productQuery/product-query.png" alt="">
<p class="product-class">产品类别</p>
<p class="product">道路机械</p>
</div>
<div class="second">
<p class="product-class">产品线</p>
<p class="product">压路机</p>
<img src="@/assets/productQuery/pull.png" alt="">
</div>
<img class="arrow" src="@/assets/productQuery/getIn.png" alt="">
</div>
<div class="box">
<div class="first">
<img src="@/assets/productQuery/product-query.png" alt="">
<p class="product-class">产品类别</p>
<p class="product">起重机械</p>
</div>
<div class="second">
<p class="product-class">产品线</p>
<p class="product">塔式起重机</p>
<img src="@/assets/productQuery/pull.png" alt="">
</div>
<img class="arrow" src="@/assets/productQuery/getIn.png" alt="">
</div>
</h-content>
</h-view>
</template>
<script>
export default {
name: 'QueryHome',
data () {
return {
}
},
computed: {},
watch: {},
methods:
{
},
}
</script>
<style lang='less' scoped>
#query {
.h-header-btn {
img {
width: 16px;
height: 16px;
margin-left: 4px;
}
span {
font-family: PingFangSC-Semibold;
margin-left: 16px;
font-size: 17px;
letter-spacing: 0.61px;
line-height: 24px;
}
}
.hinput {
position: relative;
z-index: 50;
width: 100%;
height: 50px;
//border-bottom: 1px solid #cccccc70;
display: flex;
justify-content: center;
align-items: center;
background: #fff;
.search-box {
width: 93.6%;
height: 36px;
font-size: 14px;
color: #B4B4B5;
letter-spacing: 0;
font-family: PingFangSC-Regular;
border: 1px solid rgba(56, 63, 69, 0.60);
border-radius: 4px;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
input {
width: 90%;
height: 100%;
opacity: 0.4;
border: none;
line-height: 34px;
}
}
}
.box {
position: relative;
width: 100%;
height: 79px;
background: #fff;
border-top: 1px solid #cccccc70;
margin-bottom: 8px;
.first {
height: 20px;
width: 100%;
display: flex;
flex-direction: row;
margin-top: 16px;
img {
width: 16px;
height: 16px;
margin-left: 16px;
}
.product-class {
font-family: PingFangSC-Regular;
font-size: 14px;
color: rgba(56,63,69,0.60);
margin-left: 8px;
}
.product {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #383F45;
margin-left: 16px
}
}
.second {
height: 20px;
width: 100%;
display: flex;
flex-direction: row;
margin-top: 7px;
.product-class {
font-family: PingFangSC-Regular;
font-size: 14px;
color: rgba(56,63,69,0.60);
margin-left: 54px;
}
.product {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #383F45;
margin-left: 16px
}
img {
width: 16px;
height: 16px;
margin-left: 9px;
}
}
.arrow {
position: absolute;
top: 50%;
margin-top: -8px;
right: 20px;
height: 16px;
width: 16px;
}
}
}
</style>
<!--
* @Description: In User Settings Edit
* @Author: your name
* @Date: 2019-09-24 12:34:06
* @LastEditTime: 2019-10-15 13:55:04
* @LastEditors: Please set LastEditors
-->
<template>
<div id="tab" style="height: 100%;width:100%;">
<transition>
......@@ -9,7 +16,7 @@
<router-view v-if="!$route.meta.keepAlive"/>
</transition>
<tabbar slot="bottom" class="vux-tabbar" icon-class="vux-center">
<tabbar-item :link="{path:'/tab/home'}" :selected="$route.path === '/' || $route.path==='/tab/home'">
<tabbar-item :link="{path:'/tab/home-page'}" :selected="$route.path === '/' || $route.path==='/tab/home-page'">
<img slot="icon-active" src="../assets/image/tab/home@2x.png">
<img slot="icon" src="../assets/image/tab/n_home@2x.png">
<span slot="label">主页</span>
......@@ -50,7 +57,7 @@ export default {
this.pathList.push(to.path)
this.$router.isBack = false
}
if (to.path === '/tab/home') {
if (to.path === '/tab/home-page') {
this.$router.isBack = true
this.pathList = []
}
......
......@@ -406,7 +406,7 @@ export default {
}
},
beforeRouteEnter (to, from, next) {
if (from.fullPath === '/tab/my-info') {
if (from.fullPath === '/tab/my-info') { // 绑定查询入口
next(vm => {
vm.basicInfoQuery()
vm.from = true
......@@ -501,7 +501,7 @@ export default {
return bpId
}
},
uploadIdCardFront () {
/* uploadIdCardFront () {
let vm = this
let url = process.env.basePath + 'attachment_upload'
let param = {
......@@ -516,7 +516,7 @@ export default {
console.log(res.response.attachment_id)
}
})
},
},*/
ocrShow (ocrType, type) {
let vm = this
hlsPopup.showActionSheet({
......@@ -540,9 +540,7 @@ export default {
}
let success = function (imgdata) {
if (ocrType === 'idCard') {
type === 'front'
? (vm.idCardFront = imgdata)
: (vm.idCardBack = imgdata)
type === 'front' ? (vm.idCardFront = imgdata) : (vm.idCardBack = imgdata)
vm.idCardIdentify(imgdata)
} else if (ocrType === 'bankCard') {
vm.bankImg = imgdata
......@@ -564,10 +562,7 @@ export default {
}
let success = function (imgUrl) {
if (ocrType === 'idCard') {
type === 'front'
? (vm.idCardFront = imgUrl[0])
: (vm.idCardBack = imgUrl[0])
vm.idCardIdentify(imgUrl[0])
type === 'front' ? (vm.idCardFront = imgUrl[0], vm.idCardIdentify(imgUrl[0])) : (vm.idCardBack = imgUrl[0])
} else if (ocrType === 'bankCard') {
vm.bankImg = imgUrl[0]
vm.bankCardIdentify(imgUrl[0])
......
......@@ -1134,10 +1134,7 @@ export default {
}
let success = function (imgdata) {
if (ocrType === 'idCard') {
type === 'front'
? (vm.idCardFront = imgdata)
: (vm.idCardBack = imgdata)
vm.idCardIdentify(imgdata)
type === 'front' ? (vm.idCardFront = imgdata, vm.idCardIdentify(imgdata)) : (vm.idCardBack = imgdata)
} else if (ocrType === 'bankCard') {
vm.bankImg = imgdata
vm.bankCardIdentify(imgdata)
......
......@@ -2,7 +2,7 @@
* @Description: In User Settings Edit
* @Author: your name
* @Date: 2019-09-24 12:34:06
* @LastEditTime: 2019-10-14 13:47:34
* @LastEditTime: 2019-10-15 14:37:42
* @LastEditors: Please set LastEditors
*/
import Vue from 'vue'
......@@ -58,7 +58,8 @@ import PaymentContractRecord from '@/pages/pay/payment/contract-record'
// 保证金支付
import MarginFirstPay from '../pages/pay/marginPay/first-pay'
import MarginPayEntry from '../pages/pay/marginPay/pay-entry'
// 产品查询
import QueryHome from '@/pages/productQuery/query-home'
Vue.use(Router)
export default new Router({
......@@ -83,10 +84,10 @@ export default new Router({
path: '/tab',
component: Tab,
name: 'Tab',
redirect: '/tab/home',
redirect: '/tab/home-page',
meta: {keepAlive: true},
children: [
{path: '/tab/home', component: Home, name: 'Home', meta: {keepAlive: true}},
{path: '/tab/home-page', component: HomePage, name: 'HomePage', meta: {keepAlive: false}},
{path: '/tab/my-info', component: MyInfo, name: 'MyInfo', meta: {keepAlive: true}},
],
},
......@@ -165,7 +166,8 @@ export default new Router({
// 保证金支付
{path: '/margin-first-pay', component: MarginFirstPay, name: 'MarginFirstPay', meta: {keepAlive: true}},
{path: '/margin-pay-entry', component: MarginPayEntry, name: 'MarginPayEntry', meta: {keepAlive: true}},
// 产品查询
{path: '/query-home', component: QueryHome, name: 'QueryHome', meta: {keepAlive: true}},
],
scrollBehavior (to, from, savedPosition) {
if (to.hash) {
......
.platform-ios {
.pro-wrapper{
top:225px !important;
}
}
// iPhoneX适配
@media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) {
.platform-ios{
.pro-wrapper{
top:245px !important;
}
}
}
// iPhoneXR适配
@media (device-width: 414px) and (device-height: 896px){
.platform-ios{
.pro-wrapper{
top:245px !important;
}
}
}
......@@ -6,3 +6,7 @@
background-color: @theme-color
}
}
@import "platform-ios";
@import "platform-iosx";
@import "platform-iosxr";
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment