| | |
| | | <template> |
| | | <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"> |
| | | <main-content /> |
| | | </div> |
| | | <div class="site-content__wrapper" :style="{ |
| | | <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"> |
| | | <main-content /> |
| | | </div> |
| | | <div class="site-content__wrapper" :style="{ |
| | | 'min-height': documentClientHeight + 'px', |
| | | 'margin-left': '0px' |
| | | }" v-if="isShowService"> |
| | | <MainService /> |
| | | </div> |
| | | <audio src="" id="eventAudio" muted="muted"></audio> |
| | | </template> |
| | | </div> |
| | | <MainService /> |
| | | </div> |
| | | <audio src="" id="eventAudio" muted="muted"></audio> |
| | | </template> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import MainNavbar from './main-navbar' |
| | | import MainSidebar from './main-sidebar' |
| | | import MainContent from './main-content' |
| | | import MainService from './main-service.vue' |
| | | import {menuTipAdd} from '../config' |
| | | export default { |
| | | data () { |
| | | return { |
| | | loading: true, |
| | | isShowService: false, |
| | | tips:[] |
| | | } |
| | | }, |
| | | components: { |
| | | MainNavbar, |
| | | MainSidebar, |
| | | MainContent, |
| | | MainService |
| | | }, |
| | | computed: { |
| | | documentClientHeight: { |
| | | get () { return this.$store.state.common.documentClientHeight }, |
| | | set (val) { this.$store.commit('common/updateDocumentClientHeight', val) } |
| | | }, |
| | | sidebarFold: { |
| | | get () { return this.$store.state.common.sidebarFold } |
| | | }, |
| | | userId: { |
| | | 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) } |
| | | }, |
| | | googleAuthBind:{ |
| | | 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) } |
| | | }, |
| | | }, |
| | | created () { |
| | | Vue.prototype.main = this; |
| | | import MainNavbar from './main-navbar' |
| | | import MainSidebar from './main-sidebar' |
| | | import MainContent from './main-content' |
| | | import MainService from './main-service.vue' |
| | | import { |
| | | menuTipAdd |
| | | } from '../config' |
| | | export default { |
| | | data() { |
| | | return { |
| | | loading: true, |
| | | isShowService: false, |
| | | tips: [] |
| | | } |
| | | }, |
| | | components: { |
| | | MainNavbar, |
| | | MainSidebar, |
| | | MainContent, |
| | | MainService |
| | | }, |
| | | computed: { |
| | | documentClientHeight: { |
| | | get() { |
| | | return this.$store.state.common.documentClientHeight |
| | | }, |
| | | set(val) { |
| | | this.$store.commit('common/updateDocumentClientHeight', val) |
| | | } |
| | | }, |
| | | sidebarFold: { |
| | | get() { |
| | | return this.$store.state.common.sidebarFold |
| | | } |
| | | }, |
| | | userId: { |
| | | 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) |
| | | } |
| | | }, |
| | | googleAuthBind: { |
| | | 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) |
| | | } |
| | | }, |
| | | }, |
| | | created() { |
| | | Vue.prototype.main = this; |
| | | |
| | | this.getUserInfo() |
| | | if(!this.IS_DEBUG){ |
| | | setTimeout(()=>{ |
| | | this.getNewTips() |
| | | },500); |
| | | this.getTips() |
| | | } |
| | | |
| | | |
| | | // setTimeout(()=>{ |
| | | // // this.getTips() |
| | | // },500); |
| | | |
| | | }, |
| | | mounted () { |
| | | this.resetDocumentClientHeight() |
| | | |
| | | }, |
| | | methods: { |
| | | // 重置窗口可视高度 |
| | | resetDocumentClientHeight () { |
| | | this.documentClientHeight = document.documentElement['clientHeight'] |
| | | window.onresize = () => { |
| | | this.documentClientHeight = document.documentElement['clientHeight'] |
| | | } |
| | | }, |
| | | // 获取当前管理员信息 |
| | | getUserInfo () { |
| | | this.$http({ |
| | | url: this.$http.adornUrl('/sys/user/info'), |
| | | method: 'get', |
| | | params: this.$http.adornParams() |
| | | }).then(({data}) => { |
| | | this.loading = false |
| | | this.userId = data.userId |
| | | this.userName = data.username |
| | | this.googleAuthBind = data.googleAuthBind |
| | | this.$login = true; |
| | | |
| | | console.log("data.roleName = " + JSON.stringify(data.roleName)); |
| | | this.kefuInfo = {}; |
| | | this.kefuInfo.isOnline = null; |
| | | if(data.roleName.indexOf("客服") >= 0){ |
| | | Vue.prototype.$isKefu = true; |
| | | //请求客服信息 |
| | | console.log("客服"); |
| | | console.log("this isKe = " + Vue.prototype.$isKefu); |
| | | this.personalCustomer(); |
| | | }else{ |
| | | this.kefuInfo = {}; |
| | | Vue.prototype.$isKefu = false; |
| | | console.log("不是客服"); |
| | | } |
| | | }) |
| | | }, |
| | | personalCustomer() { |
| | | this.$http({ |
| | | url: this.$http.adornUrl("/normal/adminPersonalCustomerAction!personalCustomer.action"), |
| | | method: "get", |
| | | data: this.$http.adornData({}), |
| | | }).then(({ data }) => { |
| | | console.log("personalCustomer = " + JSON.stringify(data)); |
| | | if(data.code == 0){ |
| | | let dataForm = data.data; |
| | | if(dataForm.online_state == 1){ |
| | | this.kefuInfo.isOnline = true; |
| | | }else{ |
| | | this.kefuInfo.isOnline = false; |
| | | } |
| | | console.log("kefuInfo = " + JSON.stringify(this.kefuInfo)); |
| | | this.$bus.$emit("updateKefuInfo",this.kefuInfo); |
| | | }else{ |
| | | this.$message(data.msg); |
| | | this.kefuInfo.isOnline = null; |
| | | } |
| | | |
| | | }); |
| | | }, |
| | | getNewTips(){ |
| | | |
| | | //getNewTips |
| | | if(this.$login){ |
| | | try{ |
| | | this.getNewTips2(); |
| | | }catch(e){ |
| | | console.log(JSON.stringify(e)); |
| | | } |
| | | |
| | | } |
| | | setTimeout(()=>{ |
| | | this.getNewTips() |
| | | },3000) |
| | | }, |
| | | getNewTips2(){ |
| | | var time_stamp = localStorage.getItem("timeStamp"); |
| | | 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 |
| | | )) |
| | | }).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) |
| | | { |
| | | case "1": //充值 |
| | | this.playAudioOfRecharge(); |
| | | break; |
| | | case "2": //提现 |
| | | this.playAudioOfWithdraw(); |
| | | break; |
| | | case "3": //认证 |
| | | this.playAudioOfRzzt(); |
| | | break; |
| | | } |
| | | 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]); |
| | | } |
| | | |
| | | } |
| | | |
| | | }else{ |
| | | console.log("getNewTips catch1 = "); |
| | | } |
| | | |
| | | }).catch((e) => { |
| | | // console.log("getNewTips catch = "+JSON.stringify(e)); |
| | | this.$login = false |
| | | }) |
| | | |
| | | // 交割单 OP_ADMIN_FUTURES_ORDER_TIP |
| | | // 区块链充值模块 OP_ADMIN_RECHARGE_BLOCKCHAIN_TIP |
| | | // 三方充值模块 OP_ADMIN_RECHARGE_TIP |
| | | // 提现模块 OP_ADMIN_WITHDRAW_TIP |
| | | // 认证模块 OP_ADMIN_KYC_TIP |
| | | // 高级认证模块 OP_ADMIN_KYC_HIGH_LEVEL_TIP |
| | | // OTC订单模块 OP_ADMIN_OTC_ORDER_TIP |
| | | // OTC订单聊天模块 OP_ADMIN_OTC_ORDER_ONLINECHAT_TIP |
| | | // 银行卡订单模块 OP_ADMIN_BANK_CARD_ORDER_TIP |
| | | // 用户资金密码申请模块 OP_ADMIN_USER_SAFEWORD_APPLY_TIP |
| | | // 永续合约持仓单 OP_ADMIN_CONTRACT_ORDER_TIP |
| | | // 用户客服模块 OP_ADMIN_ONLINECHAT |
| | | |
| | | }, |
| | | openURL(item) { |
| | | var test1 = window.location.protocol+"//"; |
| | | var test2 = window.location.host; |
| | | var url = test1+test2+item.tip_url; |
| | | console.log('<a href="'+url+'">'+item.tip_message+'</a>'); |
| | | this.$notify({ |
| | | title: item.tip_message, |
| | | dangerouslyUseHTMLString: true, |
| | | message: '<a href="'+url+'">'+item.tip_message+'</a>', |
| | | position: 'bottom-right' |
| | | }); |
| | | // function toUser(url){ |
| | | // window.open(url); |
| | | // } |
| | | // this.$notify({ |
| | | // title: item.tip_message, |
| | | // dangerouslyUseHTMLString: true, |
| | | // message: '<a onclick="function(){window.loaction.href = url;}" style="cursor: pointer;">'+item.tip_message+'</a>', |
| | | // position: 'bottom-right' |
| | | // }); |
| | | |
| | | }, |
| | | getTips(){ |
| | | //getNewTips |
| | | if(this.$login){ |
| | | // console.log("this.$login2 = " + this.$login); |
| | | this.getTips2(); |
| | | } |
| | | |
| | | setTimeout(()=>{ |
| | | this.getTips() |
| | | },5000) |
| | | }, |
| | | getTips2(){ |
| | | //start |
| | | this.$http({ |
| | | url: this.$http.adornUrl('/tip/getTips'), |
| | | method: 'get', |
| | | params: this.$http.adornParams() |
| | | }).then(({data}) => { |
| | | // console.log("getTips data = " + JSON.stringify(data)); |
| | | |
| | | var temp = data.data; |
| | | |
| | | var businessNum = 0; |
| | | var userNum = 0; |
| | | var moneyNum = 0; |
| | | var c2cNum = 0; |
| | | this.tips = {}; |
| | | this.initTipCountHandle(); |
| | | |
| | | // 遍历tip |
| | | if (temp.tipList.length > 0) { |
| | | temp.tipList.forEach((ele) => { |
| | | this.countHandle(ele.tip_dom_name,ele.tip_content_sum); |
| | | // if (ele.tip_dom_name == ".automonitor_threshold_order_untreated_cout" |
| | | // || ele.tip_dom_name == ".automonitor_approve_order_untreated_cout" |
| | | // || ele.tip_dom_name == ".contract_order_untreated_cout" |
| | | // || ele.tip_dom_name == ".futures_order_untreated_cout") { |
| | | // // 业务 |
| | | // businessNum = businessNum + ele.tip_content_sum; |
| | | // } else if (ele.tip_dom_name == ".kyc_untreated_cout" |
| | | // || ele.tip_dom_name == ".kyc_high_level_untreated_cout" |
| | | // || ele.tip_dom_name == ".user_safeword_apply_untreated_cout") { |
| | | // // 用户 |
| | | // userNum = userNum + ele.tip_content_sum; |
| | | // } else if (ele.tip_dom_name == ".automonitor_withdraw_order_untreated_cout" |
| | | // || ele.tip_dom_name == ".withdraw_order_untreated_cout" |
| | | // || ele.tip_dom_name == ".recharge_blockchain_order_untreated_cout" |
| | | // || ele.tip_dom_name == ".bank_card_order_untreated_cout") { |
| | | // // 财务 |
| | | // moneyNum = moneyNum + ele.tip_content_sum; |
| | | // } |
| | | }); |
| | | |
| | | // |
| | | |
| | | 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; |
| | | all += num; |
| | | } |
| | | this.countHandle(key,all); |
| | | }); |
| | | this.getUserInfo() |
| | | if (!this.IS_DEBUG) { |
| | | setTimeout(() => { |
| | | this.getNewTips() |
| | | }, 500); |
| | | this.getTips() |
| | | } |
| | | |
| | | |
| | | // console.log("this.tips = " + JSON.stringify(this.tips)); |
| | | // setTimeout(()=>{ |
| | | // // this.getTips() |
| | | // },500); |
| | | |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.resetDocumentClientHeight() |
| | | |
| | | }, |
| | | methods: { |
| | | // 重置窗口可视高度 |
| | | resetDocumentClientHeight() { |
| | | this.documentClientHeight = document.documentElement['clientHeight'] |
| | | window.onresize = () => { |
| | | this.documentClientHeight = document.documentElement['clientHeight'] |
| | | } |
| | | }, |
| | | // 获取当前管理员信息 |
| | | getUserInfo() { |
| | | this.$http({ |
| | | url: this.$http.adornUrl('/sys/user/info'), |
| | | method: 'get', |
| | | params: this.$http.adornParams() |
| | | }).then(({ |
| | | data |
| | | }) => { |
| | | this.loading = false |
| | | this.userId = data.userId |
| | | this.userName = data.username |
| | | this.googleAuthBind = data.googleAuthBind |
| | | this.$login = true; |
| | | |
| | | console.log("data.roleName = " + JSON.stringify(data.roleName)); |
| | | this.kefuInfo = {}; |
| | | this.kefuInfo.isOnline = null; |
| | | if (data.roleName.indexOf("客服") >= 0) { |
| | | Vue.prototype.$isKefu = true; |
| | | //请求客服信息 |
| | | console.log("客服"); |
| | | console.log("this isKe = " + Vue.prototype.$isKefu); |
| | | this.personalCustomer(); |
| | | } else { |
| | | this.kefuInfo = {}; |
| | | Vue.prototype.$isKefu = false; |
| | | console.log("不是客服"); |
| | | } |
| | | }) |
| | | }, |
| | | personalCustomer() { |
| | | this.$http({ |
| | | url: this.$http.adornUrl("/normal/adminPersonalCustomerAction!personalCustomer.action"), |
| | | method: "get", |
| | | data: this.$http.adornData({}), |
| | | }).then(({ |
| | | data |
| | | }) => { |
| | | console.log("personalCustomer = " + JSON.stringify(data)); |
| | | if (data.code == 0) { |
| | | let dataForm = data.data; |
| | | if (dataForm.online_state == 1) { |
| | | this.kefuInfo.isOnline = true; |
| | | } else { |
| | | this.kefuInfo.isOnline = false; |
| | | } |
| | | console.log("kefuInfo = " + JSON.stringify(this.kefuInfo)); |
| | | this.$bus.$emit("updateKefuInfo", this.kefuInfo); |
| | | } else { |
| | | this.$message(data.msg); |
| | | this.kefuInfo.isOnline = null; |
| | | } |
| | | |
| | | }); |
| | | }, |
| | | getNewTips() { |
| | | |
| | | //getNewTips |
| | | if (this.$login) { |
| | | try { |
| | | this.getNewTips2(); |
| | | } catch (e) { |
| | | console.log(JSON.stringify(e)); |
| | | } |
| | | |
| | | } |
| | | setTimeout(() => { |
| | | this.getNewTips() |
| | | }, 3000) |
| | | }, |
| | | getNewTips2() { |
| | | var time_stamp = localStorage.getItem("timeStamp"); |
| | | 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 |
| | | )) |
| | | }).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) { |
| | | case "1": //充值 |
| | | this.playAudioOfRecharge(); |
| | | break; |
| | | case "2": //提现 |
| | | this.playAudioOfWithdraw(); |
| | | 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); |
| | | }, 100 * i) |
| | | //this.openURL(data.data[i]); |
| | | } |
| | | |
| | | } |
| | | |
| | | } else { |
| | | console.log("getNewTips catch1 = "); |
| | | } |
| | | |
| | | }).catch((e) => { |
| | | // console.log("getNewTips catch = "+JSON.stringify(e)); |
| | | this.$login = false |
| | | }) |
| | | |
| | | // 交割单 OP_ADMIN_FUTURES_ORDER_TIP |
| | | // 区块链充值模块 OP_ADMIN_RECHARGE_BLOCKCHAIN_TIP |
| | | // 三方充值模块 OP_ADMIN_RECHARGE_TIP |
| | | // 提现模块 OP_ADMIN_WITHDRAW_TIP |
| | | // 认证模块 OP_ADMIN_KYC_TIP |
| | | // 高级认证模块 OP_ADMIN_KYC_HIGH_LEVEL_TIP |
| | | // OTC订单模块 OP_ADMIN_OTC_ORDER_TIP |
| | | // OTC订单聊天模块 OP_ADMIN_OTC_ORDER_ONLINECHAT_TIP |
| | | // 银行卡订单模块 OP_ADMIN_BANK_CARD_ORDER_TIP |
| | | // 用户资金密码申请模块 OP_ADMIN_USER_SAFEWORD_APPLY_TIP |
| | | // 永续合约持仓单 OP_ADMIN_CONTRACT_ORDER_TIP |
| | | // 用户客服模块 OP_ADMIN_ONLINECHAT |
| | | |
| | | }, |
| | | openURL(item) { |
| | | var test1 = window.location.protocol + "//"; |
| | | var test2 = window.location.host; |
| | | var url = test1 + test2 + item.tip_url; |
| | | console.log('<a href="' + url + '">' + item.tip_message + '</a>'); |
| | | this.$notify({ |
| | | title: item.tip_message, |
| | | dangerouslyUseHTMLString: true, |
| | | message: '<a href="' + url + '">' + item.tip_message + '</a>', |
| | | position: 'bottom-right' |
| | | }); |
| | | // function toUser(url){ |
| | | // window.open(url); |
| | | // } |
| | | // this.$notify({ |
| | | // title: item.tip_message, |
| | | // dangerouslyUseHTMLString: true, |
| | | // message: '<a onclick="function(){window.loaction.href = url;}" style="cursor: pointer;">'+item.tip_message+'</a>', |
| | | // position: 'bottom-right' |
| | | // }); |
| | | |
| | | }, |
| | | getTips() { |
| | | //getNewTips |
| | | if (this.$login) { |
| | | // console.log("this.$login2 = " + this.$login); |
| | | this.getTips2(); |
| | | } |
| | | |
| | | setTimeout(() => { |
| | | this.getTips() |
| | | }, 5000) |
| | | }, |
| | | getTips2() { |
| | | //start |
| | | this.$http({ |
| | | url: this.$http.adornUrl('/tip/getTips'), |
| | | method: 'get', |
| | | params: this.$http.adornParams() |
| | | }).then(({ |
| | | data |
| | | }) => { |
| | | // console.log("getTips data = " + JSON.stringify(data)); |
| | | |
| | | var temp = data.data; |
| | | |
| | | var businessNum = 0; |
| | | var userNum = 0; |
| | | var moneyNum = 0; |
| | | var c2cNum = 0; |
| | | this.tips = {}; |
| | | this.initTipCountHandle(); |
| | | |
| | | // 遍历tip |
| | | if (temp.tipList.length > 0) { |
| | | temp.tipList.forEach((ele) => { |
| | | this.countHandle(ele.tip_dom_name, ele.tip_content_sum); |
| | | // if (ele.tip_dom_name == ".automonitor_threshold_order_untreated_cout" |
| | | // || ele.tip_dom_name == ".automonitor_approve_order_untreated_cout" |
| | | // || ele.tip_dom_name == ".contract_order_untreated_cout" |
| | | // || ele.tip_dom_name == ".futures_order_untreated_cout") { |
| | | // // 业务 |
| | | // businessNum = businessNum + ele.tip_content_sum; |
| | | // } else if (ele.tip_dom_name == ".kyc_untreated_cout" |
| | | // || ele.tip_dom_name == ".kyc_high_level_untreated_cout" |
| | | // || ele.tip_dom_name == ".user_safeword_apply_untreated_cout") { |
| | | // // 用户 |
| | | // userNum = userNum + ele.tip_content_sum; |
| | | // } else if (ele.tip_dom_name == ".automonitor_withdraw_order_untreated_cout" |
| | | // || ele.tip_dom_name == ".withdraw_order_untreated_cout" |
| | | // || ele.tip_dom_name == ".recharge_blockchain_order_untreated_cout" |
| | | // || ele.tip_dom_name == ".bank_card_order_untreated_cout") { |
| | | // // 财务 |
| | | // moneyNum = moneyNum + ele.tip_content_sum; |
| | | // } |
| | | }); |
| | | |
| | | // |
| | | |
| | | menuTipAdd.forEach((value, key) => { |
| | | 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(".business_untreated_count",businessNum); |
| | | // // 用户 |
| | | // this.countHandle(".user_untreated_count",userNum); |
| | | // // 财务 |
| | | // this.countHandle(".money_untreated_count",moneyNum); |
| | | // console.log("this.tips = " + JSON.stringify(this.tips)); |
| | | |
| | | } |
| | | |
| | | |
| | | }) |
| | | // console.log("this.menuMap => " + JSON.stringify(this.menuMap)); |
| | | // // 业务 |
| | | // this.countHandle(".business_untreated_count",businessNum); |
| | | // // 用户 |
| | | // this.countHandle(".user_untreated_count",userNum); |
| | | // // 财务 |
| | | // this.countHandle(".money_untreated_count",moneyNum); |
| | | |
| | | // 交割单 OP_ADMIN_FUTURES_ORDER_TIP |
| | | // 区块链充值模块 OP_ADMIN_RECHARGE_BLOCKCHAIN_TIP |
| | | // 三方充值模块 OP_ADMIN_RECHARGE_TIP |
| | | // 提现模块 OP_ADMIN_WITHDRAW_TIP |
| | | // 认证模块 OP_ADMIN_KYC_TIP |
| | | // 高级认证模块 OP_ADMIN_KYC_HIGH_LEVEL_TIP |
| | | // OTC订单模块 OP_ADMIN_OTC_ORDER_TIP |
| | | // OTC订单聊天模块 OP_ADMIN_OTC_ORDER_ONLINECHAT_TIP |
| | | // 银行卡订单模块 OP_ADMIN_BANK_CARD_ORDER_TIP |
| | | // 用户资金密码申请模块 OP_ADMIN_USER_SAFEWORD_APPLY_TIP |
| | | // 永续合约持仓单 OP_ADMIN_CONTRACT_ORDER_TIP |
| | | // 用户客服模块 OP_ADMIN_ONLINECHAT |
| | | |
| | | }, |
| | | initTipCountHandle() { |
| | | // 目录 |
| | | this.countHandle(".business_untreated_count", 0); |
| | | this.countHandle(".user_untreated_count", 0); |
| | | this.countHandle(".money_untreated_count", 0); |
| | | |
| | | // 业务 |
| | | 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(".kyc_untreated_cout", 0); |
| | | this.countHandle(".kyc_high_level_untreated_cout", 0); |
| | | this.countHandle(".user_safeword_apply_untreated_cout", 0); |
| | | // 财务 |
| | | this.countHandle(".automonitor_withdraw_order_untreated_cout",0); |
| | | this.countHandle(".withdraw_order_untreated_cout", 0); |
| | | this.countHandle(".recharge_blockchain_order_untreated_cout", 0); |
| | | this.countHandle(".bank_card_order_untreated_cout", 0); |
| | | }, |
| | | //展示处理 |
| | | countHandle(ele, count) { |
| | | if (isNaN(count)) { |
| | | count = 0 |
| | | } |
| | | if (ele == null) { |
| | | count = 0 |
| | | } |
| | | this.tips[ele] = count; |
| | | }, |
| | | openNewURL(num,url,message) { |
| | | let title = "新消息"; |
| | | // let num = 21; |
| | | // let url = "home" |
| | | this.$notify({ |
| | | dangerouslyUseHTMLString: true, |
| | | showClose: true, // 关闭自带的关闭按钮 |
| | | // duration: 500, |
| | | position: 'bottom-right', |
| | | customClass: 'notifyClass',// 这个样式只能放在无scoped的style中才能生效 |
| | | message: this.$createElement( |
| | | 'div', |
| | | {class: 'notify_parent'}, |
| | | [ |
| | | this.$createElement( |
| | | 'div', |
| | | { class: 'notify_div' }, |
| | | [ |
| | | this.$createElement( |
| | | 'div', |
| | | { class: 'notify_title' }, |
| | | [ |
| | | this.$createElement( |
| | | 'div', |
| | | { class: 'circle' }, |
| | | [ |
| | | this.$createElement( |
| | | 'span', |
| | | {class: num < 10 ? 'text_num0' : 'text_num1'}, |
| | | num |
| | | ) |
| | | ] |
| | | ), |
| | | // this.$createElement( |
| | | // 'el-badge', |
| | | // // { class: 'circle' }, |
| | | // {class: 'badge'}, |
| | | // num |
| | | // ), |
| | | this.$createElement( |
| | | 'span', |
| | | {class:'text'}, |
| | | title |
| | | ) |
| | | ] |
| | | ) |
| | | // this.$createElement( |
| | | // 'i', |
| | | // { class: 'el-icon-close', on: { click: this.closeNotify } } |
| | | // ) |
| | | ] |
| | | ), |
| | | this.$createElement( |
| | | 'div', |
| | | { |
| | | // domProps: { |
| | | // innerHTML: '<em>你好啊</em>' // htmlString就是带HTML格式的字符串'<em>你好啊</em>' |
| | | // }, |
| | | class: 'notifyContent' |
| | | }, |
| | | [ |
| | | this.$createElement('img', |
| | | { |
| | | style: 'width: 46px;height: 46px;margin-top:20px; margin-left: 18px;', |
| | | attrs: {src: '/admin/new.png'} |
| | | }), |
| | | this.$createElement('div', |
| | | { |
| | | class: 'notifyContent1', |
| | | }, |
| | | [ |
| | | this.$createElement('div', |
| | | { |
| | | class: 'notifyContent2', |
| | | domProps: { |
| | | // innerHTML: '你<span style="color:#E05561">好啊</span>asasasss' |
| | | innerHTML: message |
| | | } |
| | | }), |
| | | this.$createElement('a', |
| | | { |
| | | class: 'notifyContent3', |
| | | style:"cursor:pointer;", |
| | | domProps: { |
| | | innerHTML: '点击前往' // 显示的值 |
| | | }, |
| | | on: { |
| | | click: () => { |
| | | this.handleTitleClick(url); |
| | | } |
| | | } |
| | | |
| | | }) |
| | | ] |
| | | ) |
| | | ] |
| | | ) |
| | | ] |
| | | ) |
| | | }) |
| | | }, |
| | | // 点击事件,跳转到另一个页面 |
| | | handleTitleClick(url) { |
| | | 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.$router.push({ path: "/user-relation-senior" }); |
| | | }, |
| | | } |
| | | } |
| | | }) |
| | | // console.log("this.menuMap => " + JSON.stringify(this.menuMap)); |
| | | |
| | | // 交割单 OP_ADMIN_FUTURES_ORDER_TIP |
| | | // 区块链充值模块 OP_ADMIN_RECHARGE_BLOCKCHAIN_TIP |
| | | // 三方充值模块 OP_ADMIN_RECHARGE_TIP |
| | | // 提现模块 OP_ADMIN_WITHDRAW_TIP |
| | | // 认证模块 OP_ADMIN_KYC_TIP |
| | | // 高级认证模块 OP_ADMIN_KYC_HIGH_LEVEL_TIP |
| | | // OTC订单模块 OP_ADMIN_OTC_ORDER_TIP |
| | | // OTC订单聊天模块 OP_ADMIN_OTC_ORDER_ONLINECHAT_TIP |
| | | // 银行卡订单模块 OP_ADMIN_BANK_CARD_ORDER_TIP |
| | | // 用户资金密码申请模块 OP_ADMIN_USER_SAFEWORD_APPLY_TIP |
| | | // 永续合约持仓单 OP_ADMIN_CONTRACT_ORDER_TIP |
| | | // 用户客服模块 OP_ADMIN_ONLINECHAT |
| | | |
| | | }, |
| | | initTipCountHandle() { |
| | | // 目录 |
| | | this.countHandle(".business_untreated_count", 0); |
| | | this.countHandle(".user_untreated_count", 0); |
| | | this.countHandle(".money_untreated_count", 0); |
| | | |
| | | // 业务 |
| | | this.countHandle(".automonitor_approve_order_untreated_cout", 0); |
| | | this.countHandle(".automonitor_threshold_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); |
| | | this.countHandle(".user_safeword_apply_untreated_cout", 0); |
| | | // 财务 |
| | | this.countHandle(".automonitor_withdraw_order_untreated_cout", 0); |
| | | this.countHandle(".withdraw_order_untreated_cout", 0); |
| | | this.countHandle(".recharge_blockchain_order_untreated_cout", 0); |
| | | this.countHandle(".bank_card_order_untreated_cout", 0); |
| | | }, |
| | | //展示处理 |
| | | countHandle(ele, count) { |
| | | if (isNaN(count)) { |
| | | count = 0 |
| | | } |
| | | if (ele == null) { |
| | | count = 0 |
| | | } |
| | | this.tips[ele] = count; |
| | | // this.tips[ele] = '10'; |
| | | }, |
| | | openNewURL(num, url, message) { |
| | | let title = "新消息"; |
| | | // let num = 21; |
| | | // let url = "home" |
| | | this.$notify({ |
| | | dangerouslyUseHTMLString: true, |
| | | showClose: true, // 关闭自带的关闭按钮 |
| | | // duration: 500, |
| | | position: 'bottom-right', |
| | | customClass: 'notifyClass', // 这个样式只能放在无scoped的style中才能生效 |
| | | message: this.$createElement( |
| | | 'div', { |
| | | class: 'notify_parent' |
| | | }, |
| | | [ |
| | | this.$createElement( |
| | | 'div', { |
| | | class: 'notify_div' |
| | | }, |
| | | [ |
| | | this.$createElement( |
| | | 'div', { |
| | | class: 'notify_title' |
| | | }, |
| | | [ |
| | | this.$createElement( |
| | | 'div', { |
| | | class: 'circle' |
| | | }, |
| | | [ |
| | | this.$createElement( |
| | | 'span', { |
| | | class: num < 10 ? 'text_num0' : 'text_num1' |
| | | }, |
| | | num |
| | | ) |
| | | ] |
| | | ), |
| | | // this.$createElement( |
| | | // 'el-badge', |
| | | // // { class: 'circle' }, |
| | | // {class: 'badge'}, |
| | | // num |
| | | // ), |
| | | this.$createElement( |
| | | 'span', { |
| | | class: 'text' |
| | | }, |
| | | title |
| | | ) |
| | | ] |
| | | ) |
| | | // this.$createElement( |
| | | // 'i', |
| | | // { class: 'el-icon-close', on: { click: this.closeNotify } } |
| | | // ) |
| | | ] |
| | | ), |
| | | this.$createElement( |
| | | 'div', { |
| | | // domProps: { |
| | | // innerHTML: '<em>你好啊</em>' // htmlString就是带HTML格式的字符串'<em>你好啊</em>' |
| | | // }, |
| | | class: 'notifyContent' |
| | | }, |
| | | [ |
| | | this.$createElement('img', { |
| | | style: 'width: 46px;height: 46px;margin-top:20px; margin-left: 18px;', |
| | | attrs: { |
| | | src: '/admin/new.png' |
| | | } |
| | | }), |
| | | this.$createElement('div', { |
| | | class: 'notifyContent1', |
| | | }, |
| | | [ |
| | | this.$createElement('div', { |
| | | class: 'notifyContent2', |
| | | domProps: { |
| | | // innerHTML: '你<span style="color:#E05561">好啊</span>asasasss' |
| | | innerHTML: message |
| | | } |
| | | }), |
| | | this.$createElement('a', { |
| | | class: 'notifyContent3', |
| | | style: "cursor:pointer;", |
| | | domProps: { |
| | | innerHTML: '点击前往' // 显示的值 |
| | | }, |
| | | on: { |
| | | click: () => { |
| | | this.handleTitleClick(url); |
| | | } |
| | | } |
| | | |
| | | }) |
| | | ] |
| | | ) |
| | | ] |
| | | ) |
| | | ] |
| | | ) |
| | | }) |
| | | }, |
| | | // 点击事件,跳转到另一个页面 |
| | | handleTitleClick(url) { |
| | | 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.$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; |
| | | color: #666666; |
| | | 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; |
| | | background-color: #cccdd1; |
| | | } |
| | | } |
| | | .notifyClass { |
| | | background-color: #4F5158; |
| | | border-radius: 10px; |
| | | width: 360px; |
| | | height: 116px; |
| | | } |
| | | |
| | | .notifyContent1 { |
| | | color: #666666; |
| | | min-width: 260px; |
| | | height: 100px; |
| | | margin-left: -60px; |
| | | // background-color: yellowgreen; |
| | | } |
| | | .notify_title { |
| | | margin-top: 5px; |
| | | font-weight: bold; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .notifyContent2 { |
| | | color: #666666; |
| | | font-family: PingFang HK; |
| | | font-size: 14px; |
| | | font-weight: 600; |
| | | line-height: 20px; |
| | | letter-spacing: 0em; |
| | | text-align: left; |
| | | margin-top: 20px; |
| | | .notifyContent { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | color: #666666; |
| | | height: 100px; |
| | | overflow-y: auto; |
| | | padding-right: 6px; |
| | | |
| | | } |
| | | &::-webkit-scrollbar { |
| | | width: 5px; |
| | | height: 7px; |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .notifyContent3 { |
| | | color: #333333; |
| | | font-family: PingFang HK; |
| | | font-size: 14px; |
| | | font-weight: 600; |
| | | line-height: 20px; |
| | | letter-spacing: 0em; |
| | | text-align: left; |
| | | text-decoration:underline; |
| | | margin-top: 20px; |
| | | } |
| | | &::-webkit-scrollbar-track { |
| | | border-radius: 10px; |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .notifyIcon { |
| | | color: #f75343; |
| | | margin-right: 5px; |
| | | } |
| | | .notify_div { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | background-color: #4F5158; |
| | | width: 360px; |
| | | height: 36px; |
| | | } |
| | | &::-webkit-scrollbar-thumb { |
| | | height: 20px; |
| | | border-radius: 10px; |
| | | background-color: #cccdd1; |
| | | } |
| | | } |
| | | |
| | | .notify_parent{ |
| | | background-color: #FFFFFF; |
| | | margin-left: -26px; |
| | | margin-top: -17px; |
| | | } |
| | | .notifyContent1 { |
| | | color: #666666; |
| | | min-width: 260px; |
| | | height: 100px; |
| | | margin-left: -60px; |
| | | // background-color: yellowgreen; |
| | | } |
| | | |
| | | .badge { |
| | | background: #E05561; |
| | | border: 1px solid #E05561; |
| | | border-radius: 50%; |
| | | min-height: 20px; |
| | | min-width: 20px; |
| | | margin-left: 20px; |
| | | color: #FFFFFF; |
| | | } |
| | | .notifyContent2 { |
| | | color: #666666; |
| | | font-family: PingFang HK; |
| | | font-size: 14px; |
| | | font-weight: 600; |
| | | line-height: 20px; |
| | | letter-spacing: 0em; |
| | | text-align: left; |
| | | margin-top: 20px; |
| | | |
| | | .circle { |
| | | background: #E05561; |
| | | border: 1px solid #E05561; |
| | | border-radius: 50%; |
| | | height: 20px; |
| | | width: 20px; |
| | | margin-left: 20px; |
| | | color: #FFFFFF; |
| | | text-align: left; |
| | | } |
| | | } |
| | | |
| | | .text_num0{ |
| | | color: #FFFFFF; |
| | | font-family: PingFang HK; |
| | | font-size: 14px; |
| | | font-weight: 600; |
| | | line-height: 20px; |
| | | letter-spacing: 0em; |
| | | text-align: center; |
| | | margin-left: 5px; |
| | | } |
| | | .notifyContent3 { |
| | | color: #333333; |
| | | font-family: PingFang HK; |
| | | font-size: 14px; |
| | | font-weight: 600; |
| | | line-height: 20px; |
| | | letter-spacing: 0em; |
| | | text-align: left; |
| | | text-decoration: underline; |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .text_num1{ |
| | | color: #FFFFFF; |
| | | font-family: PingFang HK; |
| | | font-size: 14px; |
| | | font-weight: 600; |
| | | line-height: 20px; |
| | | letter-spacing: 0em; |
| | | text-align: center; |
| | | // margin-left: 5px; |
| | | } |
| | | .notifyIcon { |
| | | color: #f75343; |
| | | margin-right: 5px; |
| | | } |
| | | |
| | | .text{ |
| | | color: #FFFFFF; |
| | | font-family: PingFang HK; |
| | | font-size: 14px; |
| | | font-weight: 600; |
| | | line-height: 20px; |
| | | letter-spacing: 0em; |
| | | text-align: left; |
| | | margin-left: 10px; |
| | | } |
| | | .notify_div { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | background-color: #4F5158; |
| | | width: 360px; |
| | | height: 36px; |
| | | } |
| | | |
| | | </style> |
| | | .notify_parent { |
| | | background-color: #FFFFFF; |
| | | margin-left: -26px; |
| | | margin-top: -17px; |
| | | } |
| | | |
| | | .badge { |
| | | background: #E05561; |
| | | border: 1px solid #E05561; |
| | | border-radius: 50%; |
| | | min-height: 20px; |
| | | min-width: 20px; |
| | | margin-left: 20px; |
| | | color: #FFFFFF; |
| | | } |
| | | |
| | | .circle { |
| | | background: #E05561; |
| | | border: 1px solid #E05561; |
| | | border-radius: 50%; |
| | | height: 20px; |
| | | width: 20px; |
| | | margin-left: 20px; |
| | | color: #FFFFFF; |
| | | text-align: left; |
| | | } |
| | | |
| | | .text_num0 { |
| | | color: #FFFFFF; |
| | | font-family: PingFang HK; |
| | | font-size: 14px; |
| | | font-weight: 600; |
| | | line-height: 20px; |
| | | letter-spacing: 0em; |
| | | text-align: center; |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | .text_num1 { |
| | | color: #FFFFFF; |
| | | font-family: PingFang HK; |
| | | font-size: 14px; |
| | | font-weight: 600; |
| | | line-height: 20px; |
| | | letter-spacing: 0em; |
| | | text-align: center; |
| | | // margin-left: 5px; |
| | | } |
| | | |
| | | .text { |
| | | color: #FFFFFF; |
| | | font-family: PingFang HK; |
| | | font-size: 14px; |
| | | font-weight: 600; |
| | | line-height: 20px; |
| | | letter-spacing: 0em; |
| | | text-align: left; |
| | | margin-left: 10px; |
| | | } |
| | | </style> |