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

绑定会员等级规则

parent 59362baa
......@@ -59,7 +59,7 @@ export default {
<style>
@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';
body,html{
padding: 0px;
......
......@@ -111,6 +111,7 @@ export default {
},
data(){
return {
UserAllJursdictionsList: [],
UserMemberExp: {},
showRule: false,
point: 0,
......@@ -140,8 +141,26 @@ export default {
mounted() {
this.userInfo = this.getLocalStorage();
this.getUserMemberExp()
this.getUserAllJursdictions()
},
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 () {
this.apiJavaPost(
......@@ -149,22 +168,61 @@ export default {
{customer: this.userInfo.customerId},
res => {
if (res.data.resultCode == 1) {
console.log(res)
// console.log(res)
let UserMemberExp = res.data.data
let getExpArr = [0]
let getExpTimeArr = ['-']
let getExpNullArr = ['-']
let getExpTimeArr = [{value: '-'}]
let getExpNullArr = [{value: '-'}]
UserMemberExp.exps.forEach((element, index) => {
getExpArr.push(element.exp)
getExpTimeArr.push(element.time)
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
} else {
getExpNullArr.push('-')
getExpArr.push({value: element.exp})
getExpNullArr.push({value: '-'})
}
});
getExpArr.push('-')
getExpArr.push({value: '-'})
getExpTimeArr.push(UserMemberExp.next.rate)
getExpNullArr.push(UserMemberExp.next.gap)
this.creatChart(getExpArr, getExpTimeArr, getExpNullArr)
......@@ -176,7 +234,7 @@ export default {
);
},
getColor:function (param) {
console.log(param.dataIndex, this.point+1)
// console.log(param.dataIndex, this.point+1)
if (param.dataIndex === this.point+1) {
return '#67C23A';
} else {
......@@ -185,7 +243,7 @@ export default {
},
creatChart: function(getExpArr, getExpTimeArr, getExpNullArr) {
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"));
myChart.setOption({
title: {
......@@ -280,6 +338,11 @@ export default {
borderWidth: 5,
color: that.getColor
},
markPoint: {
data: [
{name: '123', value: 700, xAxis: 2, yAxis: 2}
]
}
}
]
},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