1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([[150],{470:function(t,e,l){"use strict";l.r(e);var a=l(17),i=Object(a.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h3",{attrs:{id:"工具函数列表"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#工具函数列表"}},[t._v("#")]),t._v(" 工具函数列表")]),t._v(" "),e("div",{staticClass:"custom-block warning"},[e("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),e("p",[t._v("工具函数为自定义公共方法,通过"),e("code",[t._v("工程目录/src/common/vue-install.js")]),t._v("文件中安装后,全局挂载,方法仅做示例操作。自定义公共方法源码提供,可在"),e("code",[t._v("工程目录/src/common")]),t._v("文件夹下对不同类型的自定义公共方法自定义扩展修改。")])]),t._v(" "),e("h4",{attrs:{id:"描述信息"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#描述信息"}},[t._v("#")]),t._v(" 描述信息")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"left"}},[t._v("方法")]),t._v(" "),e("th",{staticStyle:{"text-align":"left"}},[t._v("说明")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/app.html#hasLogin"}},[t._v("hasLogin")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("判断是否登录, 根据存储字段状态判断")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/app.html#checkLogin"}},[t._v("checkLogin")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("主动检查当前页面入口是否登录,并跳转到登录页面")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/app.html#toLogin"}},[t._v("toLogin")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("跳转到登录页面并关闭当前模块")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/app.html#logonAfterEach"}},[t._v("logonAfterEach")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("登录成功后的处理逻辑")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/app.html#toErrorPage"}},[t._v("toErrorPage")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("跳转到超时页面")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/timer.html#getMessageNum"}},[t._v("getMessageNum")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("获取消息条数")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/app.html#setMessageNum"}},[t._v("setMessageNum")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("设置消息条数")])])])]),t._v(" "),e("h4",{attrs:{id:"过滤器"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#过滤器"}},[t._v("#")]),t._v(" 过滤器")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"left"}},[t._v("方法")]),t._v(" "),e("th",{staticStyle:{"text-align":"left"}},[t._v("说明")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/filters.html#formatDate"}},[t._v("formatDate")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("将日期对象或者日期字符串格式化为指定格式的日期字符串")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/filters.html#currency"}},[t._v("currency")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("将浮点型金额格式化成大写中文")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/filters.html#userNameHide"}},[t._v("userNameHide")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("姓名脱敏")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/filters.html#mobileNoHide"}},[t._v("mobileNoHide")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("对手机号码进行脱敏处理")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/filters.html#numberHide"}},[t._v("numberHide")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("对数据进行脱敏处理")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/filters.html#numberTail"}},[t._v("numberTail")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("对数据只保留后四位")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/filters.html#number4Space"}},[t._v("number4Space")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("数据每四位数字加上空格")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/filters.html#addComma"}},[t._v("addComma")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("将金额格式化成带逗号金额")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/filters.html#removeComma"}},[t._v("removeComma")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("将带逗号的金额格式化成浮点型金额")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/filters.html#product_AnAmt"}},[t._v("num_AnAmt")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("金额大于等于1万时显示万字样")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/filters.html#toPercent"}},[t._v("toPercent")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("数值百分比显示")])])])]),t._v(" "),e("h4",{attrs:{id:"认证相关"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#认证相关"}},[t._v("#")]),t._v(" 认证相关")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"left"}},[t._v("方法")]),t._v(" "),e("th",{staticStyle:{"text-align":"left"}},[t._v("说明")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/oauth.html#launchH5App"}},[t._v("setUserToken")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("设置会话token信息")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/oauth.html#getUserToken"}},[t._v("getUserToken")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("获取会话token信息")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/oauth.html#getSessionId"}},[t._v("getSessionId")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("获取用户会话ID")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/oauth.html#setSessionId"}},[t._v("setSessionId")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("设置用户会话ID")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/oauth.html#clearSessionId"}},[t._v("clearSessionId")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("清除用户会话ID")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/oauth.html#getLoginType"}},[t._v("getLoginType")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("获取不同登录方式")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/oauth.html#setLoginType"}},[t._v("setLoginType")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("设置不同登录方式")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/oauth.html#getLoginID"}},[t._v("getLoginID")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("获取用户ID标识")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/oauth.html#setLoginID"}},[t._v("setLoginID")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("设置用户ID标识")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/oauth.html#setSessionDatas"}},[t._v("setSessionDatas")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("保存用户会话集合信息")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/oauth.html#clearSessionData"}},[t._v("clearSessionData")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("清空用户会话信息")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/oauth.html#updateSessionData"}},[t._v("updateSessionData")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("保存用户会话单个信息")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/oauth.html#getSessionData"}},[t._v("getSessionData")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("读取用户会话信息")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/oauth.html#setNotRemind"}},[t._v("setNotRemind")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("设置不再提示快捷登陆")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/oauth.html#getNotRemind"}},[t._v("getNotRemind")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("判断是否设置不再提示快捷登陆")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/utils/oauth.html#getMesNum"}},[t._v("getMesNum")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("获取未读消息总数")])])])])])}),[],!1,null,null,null);e.default=i.exports}}]);
|