用户端

全局api

自定义方法已搭载全局,调用方法如下

this.myJs.调用的方法名()

heightLight 关键词高亮

this.myJs.heightLight(需要高亮的整词,关键字)

upFile 从微信聊天窗中选择文件

// extension 文件格式
// extension = ['doc','pdf']
this.myJs.upFile(extension).then()

isLogin 用户当前是否登录

// 登录返回true 未登录返回false
this.myJs.isLogin()

resetMsgArr IM消息内容的重构

// 用于聊天记录中每隔5分钟消息的时间显示
// 传入数据为Array
this.myJs.resetMsgArr(消息数据)

intervalTime 时间戳时间与当前系统时间的间隔

this.myJs.intervalTime(需要比对的时间戳)
// 返回规则
    // 一年以上:yyyy年mm月dd日 hh:MM
    // 大于一天小于两天:昨天 hh:MM
    // 大于两天:mm月dd日 hh:MM
    // 大于一小时:今天hh:MM
    // 一小时内:hh:MM

IMLogin IM登录

this.myJs.IMLogin(用户ID,用户userSig)

currentPages 获取上一个页面的页面栈及实例

this.myJs.currentPages()

reverseGeocoder 逆地址解析

    // 通过经纬度获取地址信息
    // location经纬度,不传即获取用户当前位置经纬度
    // location String location:39.11457,116.55332
	// 可用于当前位置详细信息的查询
    this.myJs.reverseGeocoder(location).then()

dictList 字典数据重构方法

	this.myJs.dictList(字典名称).then()

userInfoStatus 校验个人必填信息填写状态

	// 当前页面为非身份选择页时为true
	// url 检验完成后跳转的页面,不填则默认跳转主页,仅支持跳转tabbar页面
	this.myJs.userInfoStatus(true,url)

dictValue 字典数据解析

	this.myJs.dictValue(字典名,value)

phoneCode手机号脱敏

	// 数据类型 String || Number
	this.myJs.phoneCode(手机号)

需引用api

oss直传

目前已支持图片、文件的上传,仅开放单文件上传

	import uploadFile from '@/utils/ossUploadFile/uploadFile.js';
    uploadFile(上传文件的临时路径).then()

组件

组件采用easycom规范,无需局部注册,可全局使用

上传组件

    <h-upload :fileList='展示数据' :imageMax='图片上传最大数量' :action="普通上传的地址" @success="上传成功的回调" @delImage="删除上传列表,返回删除图片的索引"></h-upload>

首页tabs组件

    <h-tabs :list="展示数据(Array)" bgColor="背景色(String)" padding="上下内间距" current="当前选中项" @change="返回当前选择索引"></h-tabs>

企业卡片组件

    <company-card :collect="是否为收藏"></company-card>

地点筛选组件

    <h-address-sift></h-address-sift>

底部悬浮式职位列表组件

    <h-fiexd-page num="列表职位总数"></h-fiexd-page>

表单item组件

    <h-form-item list="表单数据(Array)" @changeName="文本切换" @changeBtn="选择式按钮点击" @clickInput="点击输入框"></h-form-item>

    <!-- 数据示例 -->
	<!-- type: 'input输入框模式','sex、position按钮选择模式', 'select弹出选择模式' -->
    list: [{
						title: '姓名',
						type: 'input',	
						value: '',
						placeholder: '请输入姓名'
					},
					{
						title: '性别',
						type: 'sex',
						value: '1',
						children: [{
								text: '男生',
								value: 1
							},
							{
								text: '女生',
								value: 2
							}
						]
					},
					{
						title: '出生日期',
						type: 'select',
						value: '',
						placeholder: '请选择出生日期'
					},
					{
						title: '你的身份',
						type: 'position',
						value: '1',
						children: [{
								text: '职场人',
								value: 1
							},
							{
								text: '学生',
								value: 2
							}
						]
					},
					{
						title: '求职状态',
						type: 'select',
						value: '',
						placeholder: '请选择'
					},
					{
						title: '参加工作时间',
						type: 'select',
						value: '',
						placeholder: '请选择时间'
					}
				],

个人中心功能展示组件

    <h-information list="展示数据(Object)"></h-information>

筛选组件

    <h-sift showBottom="是否展示下方按钮(Boolean)"></h-sift>

表单标签

注意事项:showRight与num和maxNum必须同时配置

    <h-title title="标题名" showRight='是否显示右侧空间' num="右侧控件已选值" maxNum="最大值" toats="提示语"></h-title>

底部悬浮登录提示框

    <login-flexd></login-flexd>

快捷登录弹窗

    <login-popup show="组件展示状态(Boolean)" @close="关闭弹窗触发事件"></login-popup>

职位卡片

    <position-card isMsg="是否在IM中使用(Boolean)" padding="内间距(String)" borderRadius="圆角(String)"></position-card>

认证状态

    <status-page title="状态标题" content=“内容></status-page>

在线简历卡片头部title

	<h-customize-title title="标题" icon="右侧icon"></h-customize-title>

头像裁剪组件

imageData通过uni.getImageInfo方法获取

	<h-cut-out imageData="图片信息" @set='保存裁剪后的图片'></h-cut-out>

Vuex使用

	// 参数名命名规则:加上前缀vuex_参数名
	// 写入
	this.$u.vuex(参数名,传入参数)
	// 读取
	this.参数名
Last Updated:
Contributors: zpw