| | |
| | | <template> |
| | | <div |
| | | class="site-wrapper" |
| | | :class="{ 'site-sidebar--fold': sidebarFold }" |
| | | v-loading.fullscreen.lock="loading" |
| | | <div class="site-wrapper" :class="{ 'site-sidebar--fold': sidebarFold }" v-loading.fullscreen.lock="loading" |
| | | element-loading-text="拼命加载中"> |
| | | <template v-if="!loading"> |
| | | <main-navbar /> |
| | | <main-sidebar v-if="!isShowService"/> |
| | | <div class="site-content__wrapper" :style="{ 'min-height': documentClientHeight + 'px' }" v-if="!isShowService"> |
| | | <div class="site-content__wrapper" :style="{ 'min-height': documentClientHeight + 'px' }" |
| | | v-if="!isShowService"> |
| | | <main-content /> |
| | | </div> |
| | | <div class="site-content__wrapper" :style="{ |
| | |
| | | import MainSidebar from './main-sidebar' |
| | | import MainContent from './main-content' |
| | | import MainService from './main-service.vue' |
| | | import {menuTipAdd} from '../config' |
| | | import { |
| | | menuTipAdd |
| | | } from '../config' |
| | | export default { |
| | | data () { |
| | | return { |
| | |
| | | }, |
| | | computed: { |
| | | documentClientHeight: { |
| | | get () { return this.$store.state.common.documentClientHeight }, |
| | | set (val) { this.$store.commit('common/updateDocumentClientHeight', val) } |
| | | get() { |
| | | return this.$store.state.common.documentClientHeight |
| | | }, |
| | | set(val) { |
| | | this.$store.commit('common/updateDocumentClientHeight', val) |
| | | } |
| | | }, |
| | | sidebarFold: { |
| | | get () { return this.$store.state.common.sidebarFold } |
| | | get() { |
| | | return this.$store.state.common.sidebarFold |
| | | } |
| | | }, |
| | | userId: { |
| | | get () { return this.$store.state.user.id }, |
| | | set (val) { this.$store.commit('user/updateId', val) } |
| | | get() { |
| | | return this.$store.state.user.id |
| | | }, |
| | | set(val) { |
| | | this.$store.commit('user/updateId', val) |
| | | } |
| | | }, |
| | | userName: { |
| | | get () { return this.$store.state.user.name }, |
| | | set (val) { this.$store.commit('user/updateName', val) } |
| | | get() { |
| | | return this.$store.state.user.name |
| | | }, |
| | | set(val) { |
| | | this.$store.commit('user/updateName', val) |
| | | } |
| | | }, |
| | | googleAuthBind:{ |
| | | get () { return this.$store.state.user.googleAuthBind }, |
| | | set (val) { this.$store.commit('user/googleAuthBind', val) } |
| | | get() { |
| | | return this.$store.state.user.googleAuthBind |
| | | }, |
| | | set(val) { |
| | | this.$store.commit('user/googleAuthBind', val) |
| | | } |
| | | }, |
| | | kefuInfo: { |
| | | get () { |
| | | return this.$store.state.common.kefuInfo |
| | | }, |
| | | set (val) { this.$store.commit('common/updateKefuInfo', val) } |
| | | set(val) { |
| | | this.$store.commit('common/updateKefuInfo', val) |
| | | } |
| | | }, |
| | | }, |
| | | created () { |
| | |
| | | url: this.$http.adornUrl('/sys/user/info'), |
| | | method: 'get', |
| | | params: this.$http.adornParams() |
| | | }).then(({data}) => { |
| | | }).then(({ |
| | | data |
| | | }) => { |
| | | this.loading = false |
| | | this.userId = data.userId |
| | | this.userName = data.username |
| | |
| | | url: this.$http.adornUrl("/normal/adminPersonalCustomerAction!personalCustomer.action"), |
| | | method: "get", |
| | | data: this.$http.adornData({}), |
| | | }).then(({ data }) => { |
| | | }).then(({ |
| | | data |
| | | }) => { |
| | | console.log("personalCustomer = " + JSON.stringify(data)); |
| | | if(data.code == 0){ |
| | | let dataForm = data.data; |
| | |
| | | }, |
| | | getNewTips2(){ |
| | | var time_stamp = localStorage.getItem("timeStamp"); |
| | | var params = {"timeStamp":time_stamp};//1688432842000 |
| | | var params = { |
| | | "timeStamp": time_stamp |
| | | }; //1688432842000 |
| | | localStorage.setItem("timeStamp",new Date().getTime()); |
| | | //start |
| | | this.$http({ |
| | | url: this.$http.adornUrl('/tip/getNewTips'), |
| | | method: 'get', |
| | | params: this.$http.adornParams(Object.assign( |
| | | { |
| | | }, |
| | | params: this.$http.adornParams(Object.assign({}, |
| | | params |
| | | )) |
| | | }).then(({data}) => { |
| | | }).then(({ |
| | | data |
| | | }) => { |
| | | // console.log("getNewTips data = " + JSON.stringify(data)); |
| | | if(data.code == 0){ |
| | | for(let i = 0 ; i < data.data.length ; i++){ |
| | | if(data.data[i].tip_message != null){ |
| | | setTimeout(()=>{ |
| | | let type = data.data[i].tip_type; |
| | | switch(type) |
| | | { |
| | | switch (type) { |
| | | case "1": //充值 |
| | | this.playAudioOfRecharge(); |
| | | break; |
| | |
| | | case "3": //认证 |
| | | this.playAudioOfRzzt(); |
| | | break; |
| | | case "5": //合约 |
| | | this.playAudioOfContract(); |
| | | break; |
| | | } |
| | | this.openNewURL(data.data[i].tip_content_num,data.data[i].tip_url,data.data[i].tip_message); |
| | | this.openNewURL(data.data[i].tip_content_num, data.data[i].tip_url, |
| | | data.data[i].tip_message); |
| | | },100*i) |
| | | //this.openURL(data.data[i]); |
| | | } |
| | |
| | | url: this.$http.adornUrl('/tip/getTips'), |
| | | method: 'get', |
| | | params: this.$http.adornParams() |
| | | }).then(({data}) => { |
| | | }).then(({ |
| | | data |
| | | }) => { |
| | | // console.log("getTips data = " + JSON.stringify(data)); |
| | | |
| | | var temp = data.data; |
| | |
| | | // |
| | | |
| | | menuTipAdd.forEach((value,key) => { |
| | | // console.log(key+":"+value); |
| | | let all = 0; |
| | | for(let i = 0 ; i < value.length ; i++){ |
| | | let num = this.tips[value[i]] || 0; |
| | | // let num = 0; |
| | | all += num; |
| | | } |
| | | this.countHandle(key,all); |
| | |
| | | // 业务 |
| | | this.countHandle(".automonitor_approve_order_untreated_cout", 0); |
| | | this.countHandle(".automonitor_threshold_order_untreated_cout", 0); |
| | | this.countHandle(".contract_order_untreated_cout", 0); |
| | | this.countHandle(".contract_order_untreated_cout-0", 0); |
| | | // 用户 |
| | | this.countHandle(".kyc_untreated_cout", 0); |
| | | this.countHandle(".kyc_high_level_untreated_cout", 0); |
| | |
| | | count = 0 |
| | | } |
| | | this.tips[ele] = count; |
| | | // this.tips[ele] = '10'; |
| | | }, |
| | | openNewURL(num,url,message) { |
| | | let title = "新消息"; |
| | |
| | | position: 'bottom-right', |
| | | customClass: 'notifyClass',// 这个样式只能放在无scoped的style中才能生效 |
| | | message: this.$createElement( |
| | | 'div', |
| | | {class: 'notify_parent'}, |
| | | 'div', { |
| | | class: 'notify_parent' |
| | | }, |
| | | [ |
| | | this.$createElement( |
| | | 'div', |
| | | { class: 'notify_div' }, |
| | | 'div', { |
| | | class: 'notify_div' |
| | | }, |
| | | [ |
| | | this.$createElement( |
| | | 'div', |
| | | { class: 'notify_title' }, |
| | | 'div', { |
| | | class: 'notify_title' |
| | | }, |
| | | [ |
| | | this.$createElement( |
| | | 'div', |
| | | { class: 'circle' }, |
| | | 'div', { |
| | | class: 'circle' |
| | | }, |
| | | [ |
| | | this.$createElement( |
| | | 'span', |
| | | {class: num < 10 ? 'text_num0' : 'text_num1'}, |
| | | 'span', { |
| | | class: num < 10 ? 'text_num0' : 'text_num1' |
| | | }, |
| | | num |
| | | ) |
| | | ] |
| | |
| | | // num |
| | | // ), |
| | | this.$createElement( |
| | | 'span', |
| | | {class:'text'}, |
| | | 'span', { |
| | | class: 'text' |
| | | }, |
| | | title |
| | | ) |
| | | ] |
| | |
| | | ] |
| | | ), |
| | | this.$createElement( |
| | | 'div', |
| | | { |
| | | 'div', { |
| | | // domProps: { |
| | | // innerHTML: '<em>你好啊</em>' // htmlString就是带HTML格式的字符串'<em>你好啊</em>' |
| | | // }, |
| | | class: 'notifyContent' |
| | | }, |
| | | [ |
| | | this.$createElement('img', |
| | | { |
| | | this.$createElement('img', { |
| | | style: 'width: 46px;height: 46px;margin-top:20px; margin-left: 18px;', |
| | | attrs: {src: '/admin/new.png'} |
| | | attrs: { |
| | | src: '/admin/new.png' |
| | | } |
| | | }), |
| | | this.$createElement('div', |
| | | { |
| | | this.$createElement('div', { |
| | | class: 'notifyContent1', |
| | | }, |
| | | [ |
| | | this.$createElement('div', |
| | | { |
| | | this.$createElement('div', { |
| | | class: 'notifyContent2', |
| | | domProps: { |
| | | // innerHTML: '你<span style="color:#E05561">好啊</span>asasasss' |
| | | innerHTML: message |
| | | } |
| | | }), |
| | | this.$createElement('a', |
| | | { |
| | | this.$createElement('a', { |
| | | class: 'notifyContent3', |
| | | style:"cursor:pointer;", |
| | | domProps: { |
| | |
| | | this.$router.push({ |
| | | path: url |
| | | }); |
| | | this.$bus.$emit('updateOfBasics',{flag:true}); |
| | | this.$bus.$emit('updateOfSenior',{flag:true}); |
| | | this.$bus.$emit('updateOfReset',{flag:true}); |
| | | this.$bus.$emit('updateOfRechange',{flag:true}); |
| | | this.$bus.$emit('updateOfWithdraw',{flag:true}); |
| | | this.$bus.$emit('updateOfBasics', { |
| | | flag: true |
| | | }); |
| | | this.$bus.$emit('updateOfSenior', { |
| | | flag: true |
| | | }); |
| | | this.$bus.$emit('updateOfReset', { |
| | | flag: true |
| | | }); |
| | | this.$bus.$emit('updateOfRechange', { |
| | | flag: true |
| | | }); |
| | | this.$bus.$emit('updateOfWithdraw', { |
| | | flag: true |
| | | }); |
| | | // this.$router.push({ path: "/user-relation-senior" }); |
| | | }, |
| | | } |
| | |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | |
| | | .notifyClass { |
| | | background-color: #4F5158; |
| | | border-radius: 10px; |
| | | width: 360px; |
| | | height: 116px; |
| | | } |
| | | |
| | | .notify_title { |
| | | margin-top: 5px; |
| | | font-weight: bold; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .notifyContent { |
| | | display: flex; |
| | | justify-content: space-between; |
| | |
| | | height: 100px; |
| | | overflow-y: auto; |
| | | padding-right: 6px; |
| | | |
| | | &::-webkit-scrollbar { |
| | | width: 5px; |
| | | height: 7px; |
| | | background-color: #fff; |
| | | } |
| | | |
| | | &::-webkit-scrollbar-track { |
| | | border-radius: 10px; |
| | | background-color: #fff; |
| | | } |
| | | |
| | | &::-webkit-scrollbar-thumb { |
| | | height: 20px; |
| | | border-radius: 10px; |
| | |
| | | color: #f75343; |
| | | margin-right: 5px; |
| | | } |
| | | |
| | | .notify_div { |
| | | display: flex; |
| | | justify-content: space-between; |
| | |
| | | text-align: left; |
| | | margin-left: 10px; |
| | | } |
| | | |
| | | </style> |
| | | |