Merge branch 'feature/开门红专区' into feature/开门红

This commit is contained in:
mengxiaolong
2020-11-24 09:32:05 +08:00
14 changed files with 259 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
import request from '@/assets/js/utils/request'
import getUrl from '@/assets/js/utils/get-url'
// 开门红业绩查询机构列表查询
export function getComList(data) {
return request({
url: getUrl('/data/performance/getComList', 1),
method: 'post',
data
})
}
// 百宝箱菜单列表查询
export function getTreasureMenus(data) {
return request({
url: getUrl('/app/code/getCodeValue', 1),
method: 'post',
data
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -0,0 +1,37 @@
// 开门红专区
const Prefecture = () => import('@/views/ebiz/goodStart/Prefecture')
const Treasure = () => import('@/views/ebiz/goodStart/Treasure')
const TreasureDetail = () => import('@/views/ebiz/goodStart/TreasureDetail')
const spreadParams = function(route) {
const params = {}
for (let key in route.query) {
params[key] = route.query[key]
}
return params
}
export default [
{
path: '/goodStart/prefecture',
name: 'Prefecture',
component: Prefecture,
meta: {
title: '开门红专区'
}
},
{
path: '/goodStart/treasure',
name: 'Treasure',
component: Treasure,
meta: {
title: '百宝箱'
}
},
{
path: '/goodStart/treasureDetail',
name: 'TreasureDetail',
component: TreasureDetail,
props: route => spreadParams(route)
}
]

View File

@@ -23,6 +23,9 @@ import institutionalPerform from './institutionalPerform'
import performance from './performance'
import attendance from './attendance'
// 开门红业绩
import goodStart from './goodStart'
import renewalManage from './renewalManage'
import question from './question'
export default [
@@ -49,5 +52,6 @@ export default [
...attendance,
...congratulation,
...renewalManage,
...question
...question,
...goodStart
] //根据需要进行删减

View File

@@ -0,0 +1,99 @@
<template>
<div class="prefecture">
<div class="menu-container">
<van-grid :column-num="2" :border="false">
<van-grid-item v-for="(menu, i) in menus" :key="i" @click="onMenuClicked(menu)">
<img :src="$assetsUrl + menu.icon" />
<span class="menu-text">{{ menu.name }}</span>
</van-grid-item>
</van-grid>
</div>
</div>
</template>
<script>
import { Grid, GridItem } from 'vant'
export default {
name: 'Prefecture',
components: {
[Grid.name]: Grid,
[GridItem.name]: GridItem
},
data() {
return {
menus: [
{ name: '开门红业绩排名', icon: 'images/goodStart/performanceRank.png', route: '/goodStart/performanceReport' },
{ name: '上头条', icon: 'images/goodStart/topOne.png', route: '/congratulation/congratulationTop' },
{ name: '大单榜', icon: 'images/goodStart/bigOrder.png', route: '/congratulation/congratulationList' },
{ name: '微信头像生成器', icon: 'images/goodStart/wechat.png', route: '/my/userWxHead2' },
{ name: '开门红方案', icon: 'images/goodStart/goodStart.png', route: '/goodStart/treasure' },
{ name: '百宝箱', icon: 'images/goodStart/treasure.png', route: '/goodStart/treasure' }
]
}
},
mounted() {
this.changeNavigator()
},
methods: {
changeNavigator() {
setTimeout(() => {
// eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('navigation_color', {
bar_color: 'E24B2D',
title_color: 'FFFFFF'
})
}, 100)
},
onMenuClicked(menu) {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#${menu.route}`
},
routerInfo: { path: `${menu.route}` }
})
}
}
}
</script>
<style lang="scss" scoped>
.prefecture {
min-height: 100vh;
background-image: url('../../../assets/images/goodStart/top.png');
background-size: contain;
background-repeat: no-repeat;
display: flex;
justify-content: center;
align-items: center;
}
.menu-container {
width: 670px;
height: 783px;
background: rgba(255, 255, 255, 0.89);
box-shadow: 0px 2px 34px 0px rgba(132, 61, 52, 0.25);
border-radius: 12px;
width: 335px;
height: 390px;
margin-top: 160px;
display: flex;
flex-direction: column;
justify-content: space-between;
img {
width: 60px;
}
.menu-text {
margin-top: 10px;
font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
line-height: 20px;
}
}
::v-deep .van-grid-item__content {
background-color: transparent;
}
</style>

View File

@@ -0,0 +1,66 @@
<template>
<div class="treasure bg-white">
<van-cell is-link v-for="(menu, index) in menus" :key="index" :icon="$assetsUrl + menu.iconUrl" @click="toDetail(menu)">
<template #title>
<span>{{ menu.name }}</span>
</template>
</van-cell>
</div>
</template>
<script>
import { Grid, GridItem } from 'vant'
import { getTreasureMenus } from '@/api/ebiz/goodStart'
export default {
name: 'Treasure',
components: {
[Grid.name]: Grid,
[GridItem.name]: GridItem
},
data() {
return {
menus: []
}
},
methods: {
toDetail(menu) {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/goodStart/treasureDetail?img=${menu.detailImgUrl}&title=${menu.name}`
},
routerInfo: {
path: `/goodStart/treasureDetail?img=${menu.detailImgUrl}&title=${menu.name}`
}
})
},
async getMenus() {
const param = { operateType: 'treasure_menus' }
const result = await getTreasureMenus(param)
console.dir(result)
if (result.result === '0') {
this.menus = result.content
} else {
this.$toast(result.resultMessage)
}
}
},
mounted() {
this.getMenus()
}
}
</script>
<style lang="scss" scoped>
.treasure {
min-height: 100vh;
}
::v-deep .van-cell {
border-bottom: 1px solid #f1f1f1;
}
img {
max-width: 80%;
}
</style>

View File

@@ -0,0 +1,31 @@
<template>
<div>
<img :src="$assetsUrl + img" />
</div>
</template>
<script>
export default {
name: 'TreasureDetail',
props: {
img: {
type: String
},
title: {
type: String
}
},
data() {
return {}
},
created() {
document.title = this.title
}
}
</script>
<style lang="scss" scoped>
img {
max-width: 100%;
}
</style>