Commit ef7a2781 by 前端

commit

1 parent 561ebfdb
// 获取品牌年龄/性别/购车年限
const overalldistribution = params => {
return window.$HTTP.get('brand/overalldistribution', params)
// 获取企业客户总览数据
const getEnterpriseOverview = params => {
return window.$HTTP.get('enterpriseCustomer/getEnterpriseOverview', params)
}
// 获取门店年龄/性别/购车年限
......@@ -8,6 +8,6 @@ const merchantOveralldistribution = params => {
return window.$HTTP.get('merchant/overalldistribution', params)
}
export default {
overalldistribution,
getEnterpriseOverview,
merchantOveralldistribution
}
......@@ -19,7 +19,7 @@ class Request {
}
if (method === 'GET') {
var paramsArray = []
Object.keys(params.req).forEach(key => paramsArray.push('req.' + key + '=' + params.req[key]))
params&&Object.keys(params.req).forEach(key => paramsArray.push('req.' + key + '=' + params.req[key]))
if (url.search(/\?/) === -1) {
url += '?' + paramsArray.join('&')
} else {
......
......@@ -2,7 +2,7 @@
<div class="tabs flex box">
<div class="tab" v-for="item in tabs" :key="item.key">
<div class="tab-title">{{ item.title }}</div>
<div class="tab-text text-linear">2,1744</div>
<div class="tab-text text-linear">{{dataList[item.key]}}</div>
</div>
</div>
</template>
......@@ -13,41 +13,53 @@ export default {
name: 'ViewTabs',
data() {
return {
dataList:{},
tabs: [
{
title: '总门店数',
key: 'wechat'
key: 'totalNum'
},
{
title: '当年新增',
key: 'wechatGroup'
key: 'incrNum'
},
{
title: '总门店数',
key: 'applet'
title: '留存率',
key: 'retention'
},
{
title: '总门店数',
key: 'publiccus'
title: '单店产值',
key: 'outputValue'
}
]
}
},
mounted() {},
methods: {}
created() {
this.getEnterpriseOverview()
},
methods: {
getEnterpriseOverview() {
this.api.customer.getEnterpriseOverview().then(res => {
console.log(res)
if(res.code == 0){
this.dataList = res.data.dataList[0]
}
})
}
}
}
</script>
<style scoped lang="scss">
.tabs {
margin: 1.22vh 0 0.98vh 0;
padding:0 1.67vw;
padding: 0 1.67vw;
height: 6.95vh;
width:100%;
width: 100%;
box-sizing: border-box;
justify-content: space-between;
.tab {
margin:0.61vh 0;
margin: 0.61vh 0;
.tab-title {
font-weight: 400;
font-size: 12px;
......
......@@ -35,14 +35,13 @@ Vue.prototype.to = function (name, params) {
Vue.config.productionTip = false
const isMock = ['prod','production'].includes(process.env.NODE_ENV)
console.log(isMock,'----------------')
fetchConfig(!isMock).then(res => {
console.log(res)
// 从配置服务器获取动态配置
// 设置 js中可以访问 $cdn
Vue.use(cfg)
// if (res.vconsole) new VConsole()
window.$HTTP = new Request(res.request)
// window.$HTTP = new Request(res.request)
window.$HTTP = new Request()
Vue.prototype.api = api
window.vm = new Vue({
el: '#app',
......
......@@ -57,7 +57,7 @@ export default {
this.isBrand = true
this.brandName = newVal.brand.name
}
this.getClientData()
// this.getClientData()
},
pieAction(data) {
this.brandList = []
......
......@@ -29,7 +29,7 @@ module.exports = {
},
proxy: {
'/dev': {
target: 'http://192.168.1.152:8081',
target: 'http://192.168.1.152:8080',
changeOrigin: true,
ws: true,
pathRewrite: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!