Commit ef840b3c authored by 786817560's avatar 786817560

'解决冲突'

parents 0dc28319 4bdad8c5
/*
* @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 { export default {
bannerList: [ 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 @@ ...@@ -2,7 +2,7 @@
* @Descrip: 主页 * @Descrip: 主页
* @Author: your name * @Author: your name
* @Date: 2019-10-10 14:25:15 * @Date: 2019-10-10 14:25:15
* @LastEditTime: 2019-10-14 13:57:37 * @LastEditTime: 2019-10-15 14:06:37
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
--> -->
<template> <template>
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<div slot="left" class="h-header-btn"> <div slot="left" class="h-header-btn">
<!-- <i class="ion-ios-arrow-back" /> --> <!-- <i class="ion-ios-arrow-back" /> -->
<img class="locations" src="@/assets/homePage/location.png" alt="" @click="location"> <img class="locations" src="@/assets/homePage/location.png" alt="" @click="location">
<span>{{ city }}</span> <span class="home-city">{{ city }}</span>
</div> </div>
<div slot="center" @click="getLocation">徐工租赁</div> <div slot="center" @click="getLocation">徐工租赁</div>
</h-header> </h-header>
...@@ -24,11 +24,21 @@ ...@@ -24,11 +24,21 @@
<img src="@/assets/homePage/banner2.png" alt=""> <img src="@/assets/homePage/banner2.png" alt="">
</swipe-item> </swipe-item>
</swipe> </swipe>
<div class="function"> <div class="functions">
<function-item <function-item
v-for="(item,index) in functionList" :key="index" :functionIcon="item.functionIcon" v-for="item in moduleSeparateList.slice(0,4)" :key="item.moduleId" :functionIcon="item.moduleIcon"
:functionName="item.functionName" :functionName="item.moduleName"
:data="item" class="function-item vue-1px" @clickFunction="goFunctionHome"/> :data="item"/>
</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>
<div class="center-pic"> <div class="center-pic">
<div class="left-pic"> <div class="left-pic">
...@@ -69,33 +79,43 @@ ...@@ -69,33 +79,43 @@
</h-view> </h-view>
</template> </template>
<script> <script>
import functionState from './functionState'
export default { export default {
name: 'HomePage', name: 'HomePage',
data () { data () {
return { return {
city: '', city: '',
province: '', province: '',
user_bp_status: '',
user_bp_class: '',
bp_id: '',
moduleSeparateList: [],
functionList: [ functionList: [
{ {
functionIcon: require('@/assets/homePage/product-select.png'), functionIcon: require('@/assets/userBind/np.png'),
functionName: '产品查询', functionName: '用户绑定',
functionState: 'UserBind', functionState: 'UserBind',
}, },
{ {
functionIcon: require('@/assets/homePage/product-trial.png'), functionIcon: require('@/assets/intoApproval/introduce.png'),
functionName: '产品试算', functionName: '绑定查询',
functionState: 'NaturePersonReadOnly', functionState: 'NaturePersonReadOnly',
}, },
{ {
functionIcon: require('@/assets/homePage/contract-query.png'), functionIcon: require('@/assets/intoApproval/introduce.png'),
functionName: '合同查询', functionName: '进件审批',
functionState: 'IntoList', functionState: 'IntoList',
}, },
{ {
functionIcon: require('@/assets/homePage/replay.png'), functionIcon: require('@/assets/intoApproval/introduce.png'),
functionName: '还款计划', functionName: '经销商签约',
functionState: 'ContractList', functionState: 'ContractList',
}, },
{
functionIcon: require('@/assets/intoApproval/introduce.png'),
functionName: '合同签约',
functionState: 'ContractSigning',
},
], ],
} }
}, },
...@@ -104,6 +124,14 @@ export default { ...@@ -104,6 +124,14 @@ export default {
created () { created () {
this.getLocation() this.getLocation()
}, },
beforeRouteEnter (to, from, next) {
next(vm => {
// if (from.name === 'Login') {
vm.moduleSeparateList = [...functionState.moduleSeparateList]
vm.userQuery()
// }
})
},
methods: methods:
{ {
// 定位 // 定位
...@@ -128,29 +156,29 @@ export default { ...@@ -128,29 +156,29 @@ export default {
}, {enableHighAccuracy: true}) }, {enableHighAccuracy: true})
}, },
goFunctionHome (data) { goFunctionHome (data) {
// if (data.functionState === 'NaturePersonReadOnly') { if (data.functionState === 'NaturePersonReadOnly') {
// if (this.user_bp_status === 'APPROVED' && this.user_bp_class === 'NP') { if (this.user_bp_status !== 'APPROVING' && this.user_bp_class === 'NP') {
// this.$router.push({ this.$router.push({
// name: 'NaturePersonReadOnly', name: 'NaturePersonReadOnly',
// params: { params: {
// 'bp_id': this.bp_id, 'bp_id': this.bp_id,
// }, },
// }) })
// } else if (this.user_bp_status === 'APPROVED' && this.user_bp_class === 'ORG') { } else if (this.user_bp_status !== 'APPROVING' && this.user_bp_class === 'ORG') {
// this.$router.push({ this.$router.push({
// name: 'EnterpriseReadOnly', name: 'EnterpriseReadOnly',
// params: { params: {
// 'bp_id': this.bp_id, 'bp_id': this.bp_id,
// }, },
// }) })
// } else { } else {
// this.hlsPopup.showLongCenter('您的绑定申请还在流程中') this.hlsPopup.showLongCenter('您的绑定申请还在流程中')
// } }
// } else { } else {
// this.$router.push({ this.$router.push({
// name: data.functionState, name: data.functionState,
// }) })
// } }
}, },
location () { location () {
this.$router.push({ this.$router.push({
...@@ -161,15 +189,114 @@ export default { ...@@ -161,15 +189,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> </script>
<style lang='less' scoped> <style lang='less' scoped>
@import "../../styles/vue-1px";
#homePage { #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; 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{ .h-header .h-header-center div{
text-align: left!important; text-align: left!important;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Descrip""/>User Settings Edit * @Descrip""/>User Settings Edit
* @Author: your name * @Author: your name
* @Date: 2019-10-11 09:39:51 * @Date: 2019-10-11 09:39:51
* @LastEditTime: 2019-10-15 10:26:04 * @LastEditTime: 2019-10-15 14:12:36
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
--> -->
<template> <template>
...@@ -62,9 +62,7 @@ ...@@ -62,9 +62,7 @@
</list-item> </list-item>
</div> </div>
</section> </section>
</section></h-view>
</section>
</h-view>
</template> </template>
<script> <script>
import BScroll from 'better-scroll' import BScroll from 'better-scroll'
...@@ -211,6 +209,9 @@ export default { ...@@ -211,6 +209,9 @@ export default {
line-height: 24px; line-height: 24px;
} }
} }
// .sec {
// position: fixed;
// }
.current-location { .current-location {
height: 34px; height: 34px;
width: 100%; width: 100%;
......
<!--
* @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> <template>
<div id="tab" style="height: 100%;width:100%;"> <div id="tab" style="height: 100%;width:100%;">
<transition> <transition>
...@@ -9,7 +16,7 @@ ...@@ -9,7 +16,7 @@
<router-view v-if="!$route.meta.keepAlive"/> <router-view v-if="!$route.meta.keepAlive"/>
</transition> </transition>
<tabbar slot="bottom" class="vux-tabbar" icon-class="vux-center"> <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-active" src="../assets/image/tab/home@2x.png">
<img slot="icon" src="../assets/image/tab/n_home@2x.png"> <img slot="icon" src="../assets/image/tab/n_home@2x.png">
<span slot="label">主页</span> <span slot="label">主页</span>
...@@ -50,7 +57,7 @@ export default { ...@@ -50,7 +57,7 @@ export default {
this.pathList.push(to.path) this.pathList.push(to.path)
this.$router.isBack = false this.$router.isBack = false
} }
if (to.path === '/tab/home') { if (to.path === '/tab/home-page') {
this.$router.isBack = true this.$router.isBack = true
this.pathList = [] this.pathList = []
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @Author: your name * @Author: your name
* @Date: 2019-09-24 12:34:06 * @Date: 2019-09-24 12:34:06
* @LastEditTime: 2019-10-14 13:47:34 * @LastEditTime: 2019-10-15 13:52:13
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
*/ */
import Vue from 'vue' import Vue from 'vue'
...@@ -83,10 +83,10 @@ export default new Router({ ...@@ -83,10 +83,10 @@ export default new Router({
path: '/tab', path: '/tab',
component: Tab, component: Tab,
name: 'Tab', name: 'Tab',
redirect: '/tab/home', redirect: '/tab/home-page',
meta: {keepAlive: true}, meta: {keepAlive: true},
children: [ 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}}, {path: '/tab/my-info', component: MyInfo, name: 'MyInfo', meta: {keepAlive: true}},
], ],
}, },
......
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