Commit 6832ed80 authored by 华国豪's avatar 华国豪 🙄

绑定会员等级规则

parent 59362baa
...@@ -59,7 +59,7 @@ export default { ...@@ -59,7 +59,7 @@ export default {
<style> <style>
@import './assets/global/font.css'; @import './assets/global/font.css';
@import '//at.alicdn.com/t/font_863923_9v70nlynbdt.css'; @import '//at.alicdn.com/t/font_863923_pxnr9ox66cp.css';
@import './assets/global/global.css'; @import './assets/global/global.css';
body,html{ body,html{
padding: 0px; padding: 0px;
......
...@@ -111,6 +111,7 @@ export default { ...@@ -111,6 +111,7 @@ export default {
}, },
data(){ data(){
return { return {
UserAllJursdictionsList: [],
UserMemberExp: {}, UserMemberExp: {},
showRule: false, showRule: false,
point: 0, point: 0,
...@@ -140,8 +141,26 @@ export default { ...@@ -140,8 +141,26 @@ export default {
mounted() { mounted() {
this.userInfo = this.getLocalStorage(); this.userInfo = this.getLocalStorage();
this.getUserMemberExp() this.getUserMemberExp()
this.getUserAllJursdictions()
}, },
methods: { methods: {
// 获取用户所有特权
getUserAllJursdictions: function () {
this.apiJavaPost(
"/api/member/getUserAllJursdictions",
{customer: this.userInfo.customerId},
res => {
if (res.data.resultCode == 1) {
// console.log(res)
this.UserAllJursdictionsList = res.data.data
} else {
this.Error(res.data.message);
}
},
null
);
},
// 获取会员经验与下个会员等级信息 // 获取会员经验与下个会员等级信息
getUserMemberExp: function () { getUserMemberExp: function () {
this.apiJavaPost( this.apiJavaPost(
...@@ -149,22 +168,61 @@ export default { ...@@ -149,22 +168,61 @@ export default {
{customer: this.userInfo.customerId}, {customer: this.userInfo.customerId},
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
console.log(res) // console.log(res)
let UserMemberExp = res.data.data let UserMemberExp = res.data.data
let getExpArr = [0] let getExpArr = [0]
let getExpTimeArr = ['-'] let getExpTimeArr = [{value: '-'}]
let getExpNullArr = ['-'] let getExpNullArr = [{value: '-'}]
UserMemberExp.exps.forEach((element, index) => { UserMemberExp.exps.forEach((element, index) => {
getExpArr.push(element.exp)
getExpTimeArr.push(element.time) getExpTimeArr.push(element.time)
if (index === UserMemberExp.exps.length-1) { if (index === UserMemberExp.exps.length-1) {
getExpNullArr.push(element.exp) getExpArr.push({
value: element.exp,
label:{
normal: {
show: true,
formatter: [
'{b|当前}',
'{a|{c}}',
].join('\n'),
// textAlign: 'center',
// borderColor: 'rgb(199,86,83)',
// borderWidth: 2,
// borderRadius: 5,
// color: '#000',
// fontSize: 14,
// shadowBlur: 3,
// shadowColor: '#888',
// shadowOffsetX: 0,
// shadowOffsetY: 3,
// lineHeight: 30,
rich: {
b: {
color: 'rgba(255, 255, 255, 0.4)',
lineHeight: 25,
fontSize: 12,
padding: 5,
},
a: {
fontSize: 18,
fontFamily: 'Microsoft YaHei',
borderColor: '#449933',
paddingLeft: 15
},
}
}
},
})
getExpNullArr.push({value: element.exp})
this.point = index this.point = index
} else { } else {
getExpNullArr.push('-') getExpArr.push({value: element.exp})
getExpNullArr.push({value: '-'})
} }
}); });
getExpArr.push('-') getExpArr.push({value: '-'})
getExpTimeArr.push(UserMemberExp.next.rate) getExpTimeArr.push(UserMemberExp.next.rate)
getExpNullArr.push(UserMemberExp.next.gap) getExpNullArr.push(UserMemberExp.next.gap)
this.creatChart(getExpArr, getExpTimeArr, getExpNullArr) this.creatChart(getExpArr, getExpTimeArr, getExpNullArr)
...@@ -176,7 +234,7 @@ export default { ...@@ -176,7 +234,7 @@ export default {
); );
}, },
getColor:function (param) { getColor:function (param) {
console.log(param.dataIndex, this.point+1) // console.log(param.dataIndex, this.point+1)
if (param.dataIndex === this.point+1) { if (param.dataIndex === this.point+1) {
return '#67C23A'; return '#67C23A';
} else { } else {
...@@ -185,7 +243,7 @@ export default { ...@@ -185,7 +243,7 @@ export default {
}, },
creatChart: function(getExpArr, getExpTimeArr, getExpNullArr) { creatChart: function(getExpArr, getExpTimeArr, getExpNullArr) {
let that = this let that = this
console.log(getExpArr, getExpTimeArr, getExpNullArr,[0, 1000, 2000, '-', '-','-'],['-', '-', 2000, 4000, 6000, 8000]) // console.log(getExpArr, getExpTimeArr, getExpNullArr,[0, 1000, 2000, '-', '-','-'],['-', '-', 2000, 4000, 6000, 8000])
let myChart = this.$echarts.init(document.getElementById("chartsMap")); let myChart = this.$echarts.init(document.getElementById("chartsMap"));
myChart.setOption({ myChart.setOption({
title: { title: {
...@@ -280,6 +338,11 @@ export default { ...@@ -280,6 +338,11 @@ export default {
borderWidth: 5, borderWidth: 5,
color: that.getColor color: that.getColor
}, },
markPoint: {
data: [
{name: '123', value: 700, xAxis: 2, yAxis: 2}
]
}
} }
] ]
},true); },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