|
|
@@ -10,7 +10,8 @@
|
|
|
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
|
|
|
<el-row :gutter="10">
|
|
|
<el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="12">Current System Time:{{nowDateTime}}</el-col> <!--当前系统时间-->
|
|
|
- <el-col :xs="24" :sm="24" :md="24" :lg="4" :xl="12">Rank:{{myEmpLv['LEVEL_NAME']!='No Rank'?myEmpLv['LEVEL_NAME']:''}}<!--<span v-if="myEmpLv['ICON_TYPE']==0">No Rank</span><img
|
|
|
+ <el-col :xs="24" :sm="24" :md="24" :lg="4" :xl="12">Rank:{{myEmpLv['LEVEL_NAME']!='No Rank'?myEmpLv['LEVEL_NAME']:''}}
|
|
|
+ <!--<span v-if="myEmpLv['ICON_TYPE']==0">No Rank</span><img
|
|
|
:src="getEmpIco(myEmpLv['ICON_TYPE'])" alt=""
|
|
|
v-for="(o,key) in parseInt(myEmpLv['ICON_NUM'])"
|
|
|
:key="key" v-if="myEmpLv['ICON_TYPE']>0">-->
|
|
|
@@ -18,6 +19,7 @@
|
|
|
<el-col :xs="24" :sm="24" :md="24" :lg="4" :xl="12">Member Level:{{decLvName}}</el-col><!--会员级别-->
|
|
|
<el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="12">Current Period:{{periodNum}}</el-col><!--当前业绩期-->
|
|
|
<el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="12">Remain BV:{{myRemainPv}}</el-col><!--剩余的PV-->
|
|
|
+ <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="12">Active Deadline Date:{{activeEnd}}</el-col><!--活跃日期截止-->
|
|
|
</el-row>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
@@ -67,101 +69,103 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import network from '@/utils/network'
|
|
|
- import tool from '@/utils/tool'
|
|
|
- import baseInfo from '@/utils/baseInfo'
|
|
|
- import userInfo from '@/utils/userInfo'
|
|
|
- import countUp from 'vue-countup-v2'
|
|
|
+import network from '@/utils/network'
|
|
|
+import tool from '@/utils/tool'
|
|
|
+import baseInfo from '@/utils/baseInfo'
|
|
|
+import userInfo from '@/utils/userInfo'
|
|
|
+import countUp from 'vue-countup-v2'
|
|
|
|
|
|
- export default {
|
|
|
- name: 'dashboard_index',
|
|
|
- components: {
|
|
|
- countUp
|
|
|
- },
|
|
|
- mounted() {
|
|
|
- network.getData(`dashboard/index`).then(response => {
|
|
|
- this.myEmpLv.ID = this.baseEmpLevels[response.empLv]['ID']
|
|
|
- this.myEmpLv.LEVEL_NAME = this.baseEmpLevels[response.empLv]['LEVEL_NAME']
|
|
|
- this.myEmpLv.ICON_TYPE = this.baseEmpLevels[response.empLv]['ICON_TYPE']
|
|
|
- this.myEmpLv.ICON_NUM = this.baseEmpLevels[response.empLv]['ICON_NUM']
|
|
|
- this.slides = response.slides
|
|
|
- this.news = response.news
|
|
|
- this.periodNum = response.periodNum
|
|
|
- this.decLvName = response.decLvName
|
|
|
- this.myRemainPv = response.myRemainPv
|
|
|
- this.loading = false
|
|
|
- this.imgLoad()
|
|
|
- return network.getData(`dashboard/bonus-num`)
|
|
|
- })
|
|
|
- if(this.verified==='0'){
|
|
|
- // '您未实名认证,请登录商城系统完善会员资料并上传身份证', '请注意'
|
|
|
- this.$confirm('You do not have real name authentication, please log in the member system to complete the member information and upload ID card.', 'Please pay attention', {
|
|
|
- confirmButtonText: 'Confirm',//确定
|
|
|
- type: 'warning'
|
|
|
- }).then(() => {
|
|
|
- }).catch(() => {
|
|
|
+export default {
|
|
|
+ name: 'dashboard_index',
|
|
|
+ components: {
|
|
|
+ countUp
|
|
|
+ },
|
|
|
+ mounted () {
|
|
|
+ network.getData(`dashboard/index`).then(response => {
|
|
|
+ this.myEmpLv.ID = this.baseEmpLevels[response.empLv]['ID']
|
|
|
+ this.myEmpLv.LEVEL_NAME = this.baseEmpLevels[response.empLv]['LEVEL_NAME']
|
|
|
+ this.myEmpLv.ICON_TYPE = this.baseEmpLevels[response.empLv]['ICON_TYPE']
|
|
|
+ this.myEmpLv.ICON_NUM = this.baseEmpLevels[response.empLv]['ICON_NUM']
|
|
|
+ this.slides = response.slides
|
|
|
+ this.news = response.news
|
|
|
+ this.periodNum = response.periodNum
|
|
|
+ this.decLvName = response.decLvName
|
|
|
+ this.myRemainPv = response.myRemainPv
|
|
|
+ this.activeEnd = response.activeEnd
|
|
|
+ this.loading = false
|
|
|
+ this.imgLoad()
|
|
|
+ return network.getData(`dashboard/bonus-num`)
|
|
|
+ })
|
|
|
+ if (this.verified === '0') {
|
|
|
+ // '您未实名认证,请登录商城系统完善会员资料并上传身份证', '请注意'
|
|
|
+ this.$confirm('You do not have real name authentication, please log in the member system to complete the member information and upload ID card.', 'Please pay attention', {
|
|
|
+ confirmButtonText: 'Confirm', // 确定
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ }).catch(() => {
|
|
|
|
|
|
- })
|
|
|
- }
|
|
|
- this.calcTime()
|
|
|
- window.addEventListener('resize', () => {
|
|
|
- this.imgLoad()
|
|
|
- }, false)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.calcTime()
|
|
|
+ window.addEventListener('resize', () => {
|
|
|
+ this.imgLoad()
|
|
|
+ }, false)
|
|
|
+ },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ loading: true,
|
|
|
+ tool: tool,
|
|
|
+ nowTime: tool.getTimestamp(),
|
|
|
+ userName: userInfo.userName(),
|
|
|
+ verified: userInfo.baseData().VERIFIED,
|
|
|
+ baseEmpLevels: baseInfo.empLevels(),
|
|
|
+ myEmpLv: {'ID': 0, 'LEVEL_NAME': null, 'ICON_TYPE': 0, 'ICON_NUM': 0},
|
|
|
+ slides: [],
|
|
|
+ news: [],
|
|
|
+ periodNum: '',
|
|
|
+ decLvName: '',
|
|
|
+ myRemainPv: '',
|
|
|
+ activeEnd: '',
|
|
|
+ bannerHeight: ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ nowDateTime: function () {
|
|
|
+ return tool.formatDate(this.nowTime)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getEmpIco (type) {
|
|
|
+ if (type) return require('@/assets/emp-ico-' + type + '.png')
|
|
|
},
|
|
|
- data() {
|
|
|
- return {
|
|
|
- loading: true,
|
|
|
- tool: tool,
|
|
|
- nowTime: tool.getTimestamp(),
|
|
|
- userName: userInfo.userName(),
|
|
|
- verified: userInfo.baseData().VERIFIED,
|
|
|
- baseEmpLevels: baseInfo.empLevels(),
|
|
|
- myEmpLv: {'ID': 0, 'LEVEL_NAME': null, 'ICON_TYPE': 0, 'ICON_NUM': 0},
|
|
|
- slides: [],
|
|
|
- news: [],
|
|
|
- periodNum: '',
|
|
|
- decLvName: '',
|
|
|
- myRemainPv: '',
|
|
|
- bannerHeight: '',
|
|
|
- }
|
|
|
+ getEmpBg (type) {
|
|
|
+ if (type !== 0) return 'backgroundImage:url(' + require('@/assets/emp-bg-' + type + '.png') + ')'
|
|
|
+ },
|
|
|
+ sub_str (str, len = 15) {
|
|
|
+ if (str) return str.slice(0, len)
|
|
|
},
|
|
|
- computed: {
|
|
|
- nowDateTime: function () {
|
|
|
- return tool.formatDate(this.nowTime)
|
|
|
+ calcTime () {
|
|
|
+ let obj = this
|
|
|
+ setInterval(function () {
|
|
|
+ obj.nowTime += 1
|
|
|
+ }, 1000)
|
|
|
+ },
|
|
|
+ go: function (url) {
|
|
|
+ this.$router.push(url)
|
|
|
+ },
|
|
|
+ imgLoad () {
|
|
|
+ let _this = this
|
|
|
+ if (_this.$refs.bannerHeight) {
|
|
|
+ _this.$nextTick(function () {
|
|
|
+ _this.bannerHeight = _this.$refs.bannerHeight[0].height
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
- methods: {
|
|
|
- getEmpIco(type) {
|
|
|
- if (type) return require('@/assets/emp-ico-' + type + '.png')
|
|
|
- },
|
|
|
- getEmpBg(type) {
|
|
|
- if (type != 0) return 'backgroundImage:url(' + require('@/assets/emp-bg-' + type + '.png') + ')'
|
|
|
- },
|
|
|
- sub_str(str, len = 15) {
|
|
|
- if (str) return str.slice(0, len)
|
|
|
- },
|
|
|
- calcTime() {
|
|
|
- let obj = this
|
|
|
- setInterval(function () {
|
|
|
- obj.nowTime += 1
|
|
|
- }, 1000)
|
|
|
- },
|
|
|
- go: function (url) {
|
|
|
- this.$router.push(url)
|
|
|
- },
|
|
|
- imgLoad() {
|
|
|
- let _this = this
|
|
|
- if (_this.$refs.bannerHeight) {
|
|
|
- _this.$nextTick(function () {
|
|
|
- _this.bannerHeight = _this.$refs.bannerHeight[0].height
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
- imageArticle(imageUrl) {
|
|
|
- return tool.getArImage(imageUrl, '/files/');
|
|
|
- },
|
|
|
+ imageArticle (imageUrl) {
|
|
|
+ return tool.getArImage(imageUrl, '/files/')
|
|
|
}
|
|
|
}
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|