Compare commits
20 Commits
0f8890674f
...
bc2adb722d
Author | SHA1 | Date |
---|---|---|
|
bc2adb722d | |
|
5fc0371ff4 | |
|
f939db5e07 | |
|
7c245ffe68 | |
|
661458ac6c | |
|
fdc050db2a | |
|
3c7f0e696b | |
|
dc0d63f415 | |
|
00474fc0be | |
|
18486ab2f2 | |
|
40bfdf1cf7 | |
|
96303795ec | |
|
4a9faf7cac | |
|
b7158e6722 | |
|
909d4ab415 | |
|
9ba61544ca | |
|
23a9a42cbf | |
|
58c10462fc | |
|
97011935b9 | |
|
9082f528f4 |
149
api/index.js
149
api/index.js
|
@ -1,70 +1,87 @@
|
|||
import {post, upload, uploads} from "../utils/request";
|
||||
import {setSecurityMeasures} from "@/utils/submitHomeworkProcess";
|
||||
import { post, upload, uploads } from '../utils/request'
|
||||
import { setSecurityMeasures } from '@/utils/submitHomeworkProcess'
|
||||
|
||||
export const submitLogin = (params) => post("/app/admin/check", params) // 登录
|
||||
export const getIDCardDeduplication = (params) => post("/app/user/goCheck", params) // 身份证去重
|
||||
export const getUserDeduplication = (params) => post("/app/user/goCheck", params) // 用户名去重
|
||||
export const getPhoneNumberDeduplication = (params) => post("/app/user/hasPhoneForApp", params) // 手机号去重
|
||||
export const setRegister = (params) => post("/app/admin/register", params) // 注册
|
||||
export const setForgotPassword = (params) => post("/app/admin/forgetPassword", params) // 忘记密码
|
||||
export const getElectronicWorkCard = (params) => post("/app/user/getUserDetailInfoByUserIdForApp", params) // 电子工牌
|
||||
export const getElectronicWorkCardQRCode = (params) => post("/app/user/generateQRCodeImageByUserId", params) // 电子工牌二维码
|
||||
export const getEmployedBy = (params) => post("/app/employmentApplyManagement/getEmploymentRecordByUserIdOrCorpInfoId", params) // 就职单位列表
|
||||
export const setResignationApplication = (params) => post("/app/employmentApplyManagement/edit", params) // 离职申请
|
||||
export const resign = (params) => post("/app/user/resign", params) // 离职申请
|
||||
export const setRelatedPartyScanning = (params) => post("/app/user/updateUserInfoAfterScanQRCode", params) // 相关方扫码
|
||||
export const getDataDictionary = (params) => post("/app/dictionaries/getLevels", params) // 数据字典
|
||||
export const setUploadAttachments = (params) => upload("/app/imgFiles/addSingleImg", params) // 上传附件
|
||||
export const removeUploadAttachments = (params) => post("/app/imgFiles/deleteImg", params) // 删除附件
|
||||
export const setRelatedPartyRegistration = (params) => post("/app/user/saveUser", params) // 相关方注册
|
||||
export const setRelatedPartyUpdate = (params) => post("/app/user/editUser", params) // 相关方修改
|
||||
export const checkRelatedUnitsPersonCount = (params) => post("/app/user/checkUserCountForApp", params) // 检查相关方单位流动人员数和单位总人数
|
||||
export const getServiceUnitList = (params) => post("/app/user/getRelatedUnitsListByUserId", params) // 服务单位列表
|
||||
export const getServiceUnitView = (params) => post("/app/user/getRelatedUnitsDetailById", params) // 服务单位查看
|
||||
export const setFeedbackUpload = (params) => upload("/app/feedback/upload", params) //反馈问题附件
|
||||
export const setFeedbackAdd = (params) => post("/app/feedback/add", params) //反馈问题提交
|
||||
export const getVersion = (params) => post("/app/versionmanager/getVersion", params) //版本更新
|
||||
export const setUpdatePassword = (params) => post("/app/user/editUserPasswordByUserId", params) //修改密码
|
||||
export const getUserInfo = (params) => post("/app/user/getDetailByUserIdAndCorpInfoId", params) //用户信息
|
||||
export const setUserInfo = (params) => post("/app/user/edit", params) //修改用户信息
|
||||
export const setEntry = (params) => post("/app/user/entry", params) //用户入职
|
||||
export const getCertificateInformationList = (params) => post("/app/specialUser/list", params) //证书信息列表
|
||||
export const getCertificateInformationView = (params) => post("/app/specialUser/goEdit", params) //证书信息查看
|
||||
export const setCertificateInformationAdd = (params) => uploads("/app/specialUser/add", params) //证书信息添加
|
||||
export const setCertificateInformationEdit = (params) => uploads("/app/specialUser/edit", params) //证书信息修改
|
||||
export const setCertificateInformationEditPost = (params) => post("/app/specialUser/edit", params) //证书信息修改
|
||||
export const getDeptTree = (params) => post("/api/department/listzTree", params) //用户信息
|
||||
export const getEMPLOYMENTAPPLYMANAGEMENTID = (params) => post("/app/user/getEMPLOYMENTAPPLYMANAGEMENTID",
|
||||
params) //获取EMPLOYMENTAPPLYMANAGEMENTID
|
||||
export const submitLogin = (params) => post('/app/admin/check', params) // 登录
|
||||
export const getIDCardDeduplication = (params) => post('/app/user/goCheck', params) // 身份证去重
|
||||
export const getUserDeduplication = (params) => post('/app/user/goCheck', params) // 用户名去重
|
||||
export const getPhoneNumberDeduplication = (params) => post('/app/user/hasPhoneForApp', params) // 手机号去重
|
||||
export const setRegister = (params) => post('/app/admin/register', params) // 注册
|
||||
export const setForgotPassword = (params) => post('/app/admin/forgetPassword', params) // 忘记密码
|
||||
export const getElectronicWorkCard = (params) => post('/app/user/getUserDetailInfoByUserIdForApp', params) // 电子工牌
|
||||
export const getElectronicWorkCardQRCode = (params) => post('/app/user/generateQRCodeImageByUserId', params) // 电子工牌二维码
|
||||
export const getEmployedBy = (params) => post('/app/employmentApplyManagement/getEmploymentRecordByUserIdOrCorpInfoId', params) // 就职单位列表
|
||||
export const setResignationApplication = (params) => post('/app/employmentApplyManagement/edit', params) // 离职申请
|
||||
export const resign = (params) => post('/app/user/resign', params) // 离职申请
|
||||
export const setRelatedPartyScanning = (params) => post('/app/user/updateUserInfoAfterScanQRCode', params) // 相关方扫码
|
||||
export const getDataDictionary = (params) => post('/app/dictionaries/getLevels', params) // 数据字典
|
||||
export const setUploadAttachments = (params) => upload('/app/imgFiles/addSingleImg', params) // 上传附件
|
||||
export const removeUploadAttachments = (params) => post('/app/imgFiles/deleteImg', params) // 删除附件
|
||||
export const setRelatedPartyRegistration = (params) => post('/app/user/saveUser', params) // 相关方注册
|
||||
export const setRelatedPartyUpdate = (params) => post('/app/user/editUser', params) // 相关方修改
|
||||
export const checkRelatedUnitsPersonCount = (params) => post('/app/user/checkUserCountForApp', params) // 检查相关方单位流动人员数和单位总人数
|
||||
export const getServiceUnitList = (params) => post('/app/user/getRelatedUnitsListByUserId', params) // 服务单位列表
|
||||
export const getServiceUnitView = (params) => post('/app/user/getRelatedUnitsDetailById', params) // 服务单位查看
|
||||
export const setFeedbackUpload = (params) => upload('/app/feedback/upload', params) //反馈问题附件
|
||||
export const setFeedbackAdd = (params) => post('/app/feedback/add', params) //反馈问题提交
|
||||
export const getVersion = (params) => post('/app/versionmanager/getVersion', params) // 版本更新
|
||||
export const setUpdatePassword = (params) => post('/app/user/editUserPasswordByUserId', params) //修改密码
|
||||
export const getUserInfo = (params) => post('/app/user/getDetailByUserIdAndCorpInfoId', params) //用户信息
|
||||
export const setUserInfo = (params) => post('/app/user/edit', params) //修改用户信息
|
||||
export const setEntry = (params) => post('/app/user/entry', params) //用户入职
|
||||
export const getCertificateInformationList = (params) => post('/app/specialUser/list', params) //证书信息列表
|
||||
export const getCertificateInformationView = (params) => post('/app/specialUser/goEdit', params) //证书信息查看
|
||||
export const setCertificateInformationAdd = (params) => uploads('/app/specialUser/add', params) //证书信息添加
|
||||
export const setCertificateInformationEdit = (params) => uploads('/app/specialUser/edit', params) //证书信息修改
|
||||
export const setCertificateInformationEditPost = (params) => post('/app/specialUser/edit', params) //证书信息修改
|
||||
export const getDeptTree = (params) => post('/api/department/listzTree', params) //用户信息
|
||||
export const getEMPLOYMENTAPPLYMANAGEMENTID = (params) => post('/app/user/getEMPLOYMENTAPPLYMANAGEMENTID', params) //获取EMPLOYMENTAPPLYMANAGEMENTID
|
||||
|
||||
// 以下接口八项作业流程使用
|
||||
export const getCorpInfoList = (params) => post("/app/util/getCorp", params) //获取公司列表
|
||||
export const getConfinedSpaceSelectList = (params) => post("/app/csSpe/getSpace", params) //获取受限空间名称选择列表
|
||||
export const getConfinedSpaceGasInfo = (params) => post("/app/csSpe/getGasInfo",params) //获取受限空间气体检测详情
|
||||
export const setConfinedSpaceGasInfoSave = (params) => post("/app/csSpe/initGas", params) //受限空间气体检测详情保存
|
||||
export const setConfinedSpaceGasDelete = (params) => post("/app/csSpe/deleteGas", params) //保存受限空间气体检测删除
|
||||
export const getHotWorkGasAll = (params) => post("/app/elSpe/getAll", params) // 获取动火作业的所有受限空间气体检测数据
|
||||
export const getHotWorkGasInfo = (params) => post("/app/elSpe/getInfo", params) //获取动火作业的受限空间气体检测详情
|
||||
export const getHotWorkGasInfoSave = (params) => post("/app/elSpe/init", params) //获取动火作业的受限空间气体检测详情保存
|
||||
export const getHotWorkGasDelete = (params) => post("/app/elSpe/delete", params) // 动火作业的受限空间气体检测删除
|
||||
export const setHotWorkRecord = (params) => post("/app/deHw/initRecord", params) // 动火作业延迟监火保存记录
|
||||
export const deleteHotWorkRecord = (params) => post("/app/deHw/deleteRecord", params) //获取动火作业的受限空间气体检测详情
|
||||
export const getHotWorkRecord = (params) => post("/app/deHw/getRecords", params) //获取动火作业的受限空间气体检测详情保存
|
||||
export const getOtherAssignmentsSelectList = (params) => post("/app/Task/getAllUnEndList", params) //关联的其他特殊作业及安全作业票编号选择列表
|
||||
export const getRiskIdentificationResultsSelectList = (params) => post("/app/eightWork/getInfo", params) //风险辨识结果选择列表
|
||||
export const getHotWorkMethodSelectList = (params) => post("/app/util/getDicList", params) // 动火方法选择列表
|
||||
export const getQyDicList = (params) => post("/app/util/otherSysDic", params) // 动火方法选择列表
|
||||
export const setTaskSave = (params) => post("/app/Task/init", params) //八项作业、隐患整改、安全环保检查任务保存更新接口
|
||||
export const getCurrentNextOperation = (params) => post("/app/Task/getSupplementInfo", params) //获取当前任务的下一步操作
|
||||
export const addFormInfo = (params) => post("/app/Task/addSupplementInfo", params) //审批过程中添加其他信息
|
||||
export const getDepartmentTree = (params) => post("/app/util/getDepartmentTree", params) //获取部门树
|
||||
export const getUserList = (params) => post("/app/util/getUserList", params) //获取人员
|
||||
export const getToDoTaskList = (params) => post("/app/Task/getAllList", params) //获取待办列表
|
||||
export const getTaskTechnologicalProcess = (params) => post("/app/Task/getAgencyList", params) //获取流程
|
||||
export const getTaskInfo = (params) => post("/app/Task/getInfo", params) //查看信息
|
||||
export const setTaskFile = (params) => upload("/app/util/uploadFile", params) //上传文件
|
||||
export const setTaskSign = (params) => post("/app/Task/sign", params) //审批意见签字提交
|
||||
export const setSecurityMeasuresSave = (params) => post("/app/Task/setQues", params) //安全措施提交
|
||||
export const setOtherSecurityMeasuresSave = (params) => post("/app/Task/setOtherQues", params) //其它安全措施提交
|
||||
export const getHistoricalApprovalRecords = (params) => post("/app/Task/getHis", params); // 历史审批记录
|
||||
export const getCorpInfoList = (params) => post('/app/util/getCorp', params) //获取公司列表
|
||||
export const getConfinedSpaceSelectList = (params) => post('/app/csSpe/getSpace', params) //获取受限空间名称选择列表
|
||||
export const getConfinedSpaceGasInfo = (params) => post('/app/csSpe/getGasInfo', params) //获取受限空间气体检测详情
|
||||
export const setConfinedSpaceGasInfoSave = (params) => post('/app/csSpe/initGas', params) //受限空间气体检测详情保存
|
||||
export const setConfinedSpaceGasDelete = (params) => post('/app/csSpe/deleteGas', params) //保存受限空间气体检测删除
|
||||
export const getHotWorkGasAll = (params) => post('/app/elSpe/getAll', params) // 获取动火作业的所有受限空间气体检测数据
|
||||
export const getHotWorkGasInfo = (params) => post('/app/elSpe/getInfo', params) //获取动火作业的受限空间气体检测详情
|
||||
export const getHotWorkGasInfoSave = (params) => post('/app/elSpe/init', params) //获取动火作业的受限空间气体检测详情保存
|
||||
export const getHotWorkGasDelete = (params) => post('/app/elSpe/delete', params) // 动火作业的受限空间气体检测删除
|
||||
export const setHotWorkRecord = (params) => post('/app/deHw/initRecord', params) // 动火作业延迟监火保存记录
|
||||
export const deleteHotWorkRecord = (params) => post('/app/deHw/deleteRecord', params) //获取动火作业的受限空间气体检测详情
|
||||
export const getHotWorkRecord = (params) => post('/app/deHw/getRecords', params) //获取动火作业的受限空间气体检测详情保存
|
||||
export const getOtherAssignmentsSelectList = (params) => post('/app/Task/getAllUnEndList', params) //关联的其他特殊作业及安全作业票编号选择列表
|
||||
export const getRiskIdentificationResultsSelectList = (params) => post('/app/eightWork/getInfo', params) //风险辨识结果选择列表
|
||||
export const getHotWorkMethodSelectList = (params) => post('/app/util/getDicList', params) // 动火方法选择列表
|
||||
export const getQyDicList = (params) => post('/app/util/otherSysDic', params) // 动火方法选择列表
|
||||
export const setTaskSave = (params) => post('/app/Task/init', params) //八项作业、隐患整改、安全环保检查任务保存更新接口
|
||||
export const getCurrentNextOperation = (params) => post('/app/Task/getSupplementInfo', params) //获取当前任务的下一步操作
|
||||
export const addFormInfo = (params) => post('/app/Task/addSupplementInfo', params) //审批过程中添加其他信息
|
||||
export const getDepartmentTree = (params) => post('/app/util/getDepartmentTree', params) //获取部门树
|
||||
export const getUserList = (params) => post('/app/util/getUserList', params) //获取人员
|
||||
export const getToDoTaskList = (params) => post('/app/Task/getAllList', params) //获取待办列表
|
||||
export const getTaskTechnologicalProcess = (params) => post('/app/Task/getAgencyList', params) //获取流程
|
||||
export const getTaskInfo = (params) => post('/app/Task/getInfo', params) //查看信息
|
||||
export const setTaskFile = (params) => upload('/app/util/uploadFile', params) //上传文件
|
||||
export const setTaskSign = (params) => post('/app/Task/sign', params) //审批意见签字提交
|
||||
export const setSecurityMeasuresSave = (params) => post('/app/Task/setQues', params) //安全措施提交
|
||||
export const setOtherSecurityMeasuresSave = (params) => post('/app/Task/setOtherQues', params) //其它安全措施提交
|
||||
export const getHistoricalApprovalRecords = (params) => post('/app/Task/getHis', params) // 历史审批记录
|
||||
// 结束
|
||||
|
||||
// ****************************************************
|
||||
// ************* 以下接口培训管理流程使用 ***************
|
||||
// ********************* start ***********************
|
||||
export const getIsUploadFace = (params) => post('/app/user/getUserFace', params) // 获取是否上传人脸信息
|
||||
export const getClassList = (params) => post('/app/stagestudentrelation/pageTaskByUser', params) //获取班级列表
|
||||
export const joinClass = (params) => uploads('/app/student/joinClass', params) // 实名认证信息提交
|
||||
export const getSignInfo = (params) => post('/app/student/signinfo', params) // 获取签到信息
|
||||
export const getTaskScoreInfo = (params) => post('/app/stageexam/findResult', params) // 考试成绩记录详情
|
||||
export const getExamExercises = (params) => post('/app/stageexam/getExam', params) // 考试习题
|
||||
export const setTestPaperSubmission = (params) => post('/app/stageexam/submit', params) // 考试交卷
|
||||
export const submitEditUserFace = (params) => post('/app/user/editUserFace', params) // 提交照片人脸
|
||||
export const submitEditUserVideoFace = (params) => post('/app/user/editUserVideoFace', params) // 提交视频人脸
|
||||
export const compareUserFaceCertify = (params) => post('/app/user/compareFace', params) // 照片人脸认证
|
||||
export const compareUserVideoFaceCertify = (params) => post('/app/user/compareVideoFace', params) // 视频人脸验证
|
||||
export const compareUserExamFaceCertify = (params) => post('/app/user/compareExamFace', params) // 考试照片人脸认证
|
||||
export const compareUserExamVideoFaceCertify = (params) => post('/app/user/compareExamVideoFace', params) // 考试视频人脸认证
|
||||
// ********************* end ***********************
|
||||
|
|
48
pages.json
48
pages.json
|
@ -385,6 +385,54 @@
|
|||
"style": {
|
||||
"navigationBarTitleText": "定位"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/train_management/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "培训管理",
|
||||
"app-plus": {
|
||||
"titleNView": {
|
||||
"buttons": [
|
||||
{
|
||||
"color": "#FFF",
|
||||
"fontSize": "50rpx",
|
||||
"text": "\ue62a",
|
||||
"fontSrc": "/static/fonts/uniicons.ttf"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/train_management/sign_information",
|
||||
"style": {
|
||||
"navigationBarTitleText": "签到信息"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/train_management/exam_record",
|
||||
"style": {
|
||||
"navigationBarTitleText": "考试记录"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/train_management/realname_info_auth",
|
||||
"style": {
|
||||
"navigationBarTitleText": "实名认证"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/train_management/face_authentication",
|
||||
"style": {
|
||||
"navigationBarTitleText": "人脸认证"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/train_management/course_exam",
|
||||
"style": {
|
||||
"navigationBarTitleText": "开始考试"
|
||||
}
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
|
|
|
@ -1,138 +1,180 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<view class="status_bar">
|
||||
<view class="top_view"></view>
|
||||
</view>
|
||||
<view class="wui_banner">
|
||||
<view class="banner_img">
|
||||
<image src="../../static/home-bg.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="home-apps">
|
||||
<view class="home-apps-item" @click="fnScan">
|
||||
<view class="home-apps-item-img">
|
||||
<image src="../../static/icon-apps/app_icons6.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text">
|
||||
<text>扫码</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="home-apps-item" v-for="(item,index) in baseList" :key="index" @click="fnNavigator(index)">
|
||||
<view class="home-apps-item-img">
|
||||
<image :src="item.img" mode=""></image>
|
||||
</view>
|
||||
<view class="text">
|
||||
<text>{{ item.title }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-modal :show="updateVersion.modalShow" title="温馨提示" :showConfirmButton="updateVersion.showConfirmButton"
|
||||
:showCancelButton="updateVersion.showCancelButton" :confirmText="updateVersion.confirmText"
|
||||
:cancelText="updateVersion.cancelText"
|
||||
@cancel="modalCancel" @confirm="modalConfirm">
|
||||
<view style="text-align: center;color:#606266">
|
||||
<rich-text :nodes="updateVersion.modalContent"></rich-text>
|
||||
</view>
|
||||
</u-modal>
|
||||
</view>
|
||||
<view class="page">
|
||||
<view class="status_bar">
|
||||
<view class="top_view"></view>
|
||||
</view>
|
||||
<view class="wui_banner">
|
||||
<view class="banner_img">
|
||||
<image src="../../static/home-bg.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="home-apps">
|
||||
<view class="home-apps-item" @click="fnScan">
|
||||
<view class="home-apps-item-img">
|
||||
<image src="../../static/icon-apps/app_icons6.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text">
|
||||
<text>扫码</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="home-apps-item" v-for="(item, index) in baseList" :key="index" @click="fnNavigator(index)">
|
||||
<view class="home-apps-item-img">
|
||||
<image :src="item.img" mode=""></image>
|
||||
</view>
|
||||
<view class="text">
|
||||
<text>{{ item.title }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-modal
|
||||
:show="updateVersion.modalShow"
|
||||
title="温馨提示"
|
||||
:showConfirmButton="updateVersion.showConfirmButton"
|
||||
:showCancelButton="updateVersion.showCancelButton"
|
||||
:confirmText="updateVersion.confirmText"
|
||||
:cancelText="updateVersion.cancelText"
|
||||
@cancel="modalCancel"
|
||||
@confirm="modalConfirm"
|
||||
>
|
||||
<view style="text-align: center; color: #606266">
|
||||
<rich-text :nodes="updateVersion.modalContent"></rich-text>
|
||||
</view>
|
||||
</u-modal>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import updateVersion from "../../utils/updateVersion";
|
||||
import {setEntry} from "../../api";
|
||||
import updateVersion from '../../utils/updateVersion'
|
||||
import { setEntry, getIsUploadFace } from '../../api'
|
||||
|
||||
export default {
|
||||
mixins: [updateVersion],
|
||||
data() {
|
||||
return {
|
||||
baseList: [
|
||||
{
|
||||
img: require('../../static/icon-apps/app_icons.png'),
|
||||
title: '电子工牌',
|
||||
url: '/pages/electronic_work_card/index'
|
||||
},
|
||||
{
|
||||
img: require('../../static/icon-apps/app_icons2.png'),
|
||||
title: '服务单位 管理',
|
||||
url: '/pages/service_unit_management/index'
|
||||
},
|
||||
{
|
||||
img: require('../../static/icon-apps/app_icons3.png'),
|
||||
title: '我的信息',
|
||||
url: '/pages/mine/information/index'
|
||||
},
|
||||
{
|
||||
img: require('../../static/icon-apps/app_icons4.png'),
|
||||
title: '证书信息',
|
||||
url: '/pages/certificate_information/index'
|
||||
},
|
||||
{
|
||||
img: require('../../static/icon-apps/app_icons5.png'),
|
||||
title: '就职单位',
|
||||
url: '/pages/employed_by/index'
|
||||
},
|
||||
{
|
||||
img: require('../../static/icon-apps/app_icons7.png'),
|
||||
title: '高危作业',
|
||||
url: '/pages/eight_assignments/index'
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
userInfo() {
|
||||
return this.$store.getters.getUserInfo
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.fnUpdateVersion(false)
|
||||
},
|
||||
methods: {
|
||||
async fnScan() {
|
||||
uni.scanCode({
|
||||
success: async (res) => {
|
||||
let obj = JSON.parse(res.result)
|
||||
let type = obj[0].CODE_TYPE
|
||||
if (type === '0') {
|
||||
let info = await setEntry({
|
||||
USER_ID: this.userInfo.USER_ID,
|
||||
CORPINFO_ID: obj[0].CORPINFO_ID,
|
||||
RELEVANT_UNIT_NAME: obj[0].RELEVANT_UNIT_NAME
|
||||
});
|
||||
if (info.code === 200) {
|
||||
uni.$u.toast('入职成功')
|
||||
} else {
|
||||
uni.$u.toast(info.msg ? info.msg : '系统异常请联系管理员')
|
||||
}
|
||||
} else if (type === '1') {
|
||||
// type=1时跳转电子工牌页面
|
||||
uni.$u.route({
|
||||
url: '/pages/electronic_work_card/index',
|
||||
params: {
|
||||
USER_ID: obj[0].USER_ID,
|
||||
CODE_TYPE: obj[0].CODE_TYPE
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
fnIsShow(index) {
|
||||
if (index === 5) return !!this.userInfo.CORPINFO_ID
|
||||
return true
|
||||
},
|
||||
fnNavigator(e) {
|
||||
uni.$u.route({
|
||||
url: this.baseList[e].url
|
||||
})
|
||||
},
|
||||
},
|
||||
mixins: [updateVersion],
|
||||
data() {
|
||||
return {
|
||||
baseList: [
|
||||
{
|
||||
img: require('../../static/icon-apps/app_icons.png'),
|
||||
title: '电子工牌',
|
||||
url: '/pages/electronic_work_card/index'
|
||||
},
|
||||
{
|
||||
img: require('../../static/icon-apps/app_icons2.png'),
|
||||
title: '服务单位 管理',
|
||||
url: '/pages/service_unit_management/index'
|
||||
},
|
||||
{
|
||||
img: require('../../static/icon-apps/app_icons3.png'),
|
||||
title: '我的信息',
|
||||
url: '/pages/mine/information/index'
|
||||
},
|
||||
{
|
||||
img: require('../../static/icon-apps/app_icons4.png'),
|
||||
title: '证书信息',
|
||||
url: '/pages/certificate_information/index'
|
||||
},
|
||||
{
|
||||
img: require('../../static/icon-apps/app_icons5.png'),
|
||||
title: '就职单位',
|
||||
url: '/pages/employed_by/index'
|
||||
},
|
||||
{
|
||||
img: require('../../static/icon-apps/app_icons7.png'),
|
||||
title: '高危作业',
|
||||
url: '/pages/eight_assignments/index'
|
||||
},
|
||||
{
|
||||
img: require('../../static/icon-apps/app_icons8.png'),
|
||||
title: '培训管理',
|
||||
url: '/pages/train_management/index'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
userInfo() {
|
||||
return this.$store.getters.getUserInfo
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.fnUpdateVersion(false)
|
||||
this.getUserFaceCompleted()
|
||||
},
|
||||
methods: {
|
||||
async fnScan() {
|
||||
uni.scanCode({
|
||||
success: async (res) => {
|
||||
let obj = JSON.parse(res.result)
|
||||
let type = obj[0].CODE_TYPE
|
||||
if (type === '0') {
|
||||
let info = await setEntry({
|
||||
USER_ID: this.userInfo.USER_ID,
|
||||
CORPINFO_ID: obj[0].CORPINFO_ID,
|
||||
RELEVANT_UNIT_NAME: obj[0].RELEVANT_UNIT_NAME
|
||||
})
|
||||
if (info.code === 200) {
|
||||
uni.$u.toast('入职成功')
|
||||
} else {
|
||||
uni.$u.toast('入职失败,请联系管理员')
|
||||
}
|
||||
} else if (type === '1') {
|
||||
// type=1时跳转电子工牌页面
|
||||
uni.$u.route({
|
||||
url: '/pages/electronic_work_card/index',
|
||||
params: {
|
||||
USER_ID: obj[0].USER_ID,
|
||||
CODE_TYPE: obj[0].CODE_TYPE
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
fnIsShow(index) {
|
||||
if (index === 5) return !!this.userInfo.CORPINFO_ID
|
||||
return true
|
||||
},
|
||||
fnNavigator(e) {
|
||||
uni.$u.route({
|
||||
url: this.baseList[e].url
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取是否已经完成上传人脸信息
|
||||
*/
|
||||
async getUserFaceCompleted() {
|
||||
const userFaceData = await getIsUploadFace()
|
||||
// userFaceData.authentication --> 0: 未完成人脸认证
|
||||
// userFaceData.authentication --> 1: 已完成人脸认证
|
||||
this.$store.dispatch('setVerification', userFaceData.authentication ? userFaceData.authentication : "0"); // 设置本地存储人脸检测验证状态
|
||||
const isPassedVerification = userFaceData.authentication === '0'
|
||||
if (isPassedVerification) {
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: '为了能够得到更好的体验,我们会获取您个人信息,请完成人脸信息认证!',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
uni.$u.route({
|
||||
url: '/pages/train_management/face_authentication',
|
||||
params: {
|
||||
type: 'facial_input'
|
||||
}
|
||||
})
|
||||
}
|
||||
if (res.cancel) {
|
||||
uni.$u.toast("您可进入[我的]-[人脸认证]完成信息认证")
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page {
|
||||
background-color: #f7f9ff;
|
||||
min-height: 100vh;
|
||||
background-color: #f7f9ff;
|
||||
min-height: 100vh;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -64,6 +64,11 @@ export default {
|
|||
name: '个人信息',
|
||||
url: '/pages/mine/information/index'
|
||||
},
|
||||
{
|
||||
img: require('../../../static/images/my_ico2.png'),
|
||||
name: '人脸认证',
|
||||
url: '/pages/train_management/face_authentication?type=update_facial_input'
|
||||
},
|
||||
{
|
||||
img: require('../../../static/images/my_ico3.png'),
|
||||
name: '问题反馈',
|
||||
|
|
|
@ -0,0 +1,428 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="top">
|
||||
<image src="/static/images/study/bgimg1.png" />
|
||||
<view class="suject">
|
||||
<text class="line-2">考试科目:{{ info.examname }}</text>
|
||||
</view>
|
||||
<view class="questions">
|
||||
<text>当前试题{{ current + 1 }}/{{ options.length }}</text>
|
||||
</view>
|
||||
<view class="time">
|
||||
<text>考试剩余时间:</text>
|
||||
<u-count-down
|
||||
:time="info.answersheettime * 60 * 1000"
|
||||
format="HH 时 mm 分 ss 秒"
|
||||
@finish="fnCountDownFinish"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="topic">
|
||||
<view class="title">
|
||||
<text>
|
||||
<text class="tag_title">
|
||||
{{ handleCalcQuestType(options[current].questiontype) }}
|
||||
</text>
|
||||
{{ current + 1 }}.{{ options[current].questiondry }}
|
||||
</text>
|
||||
</view>
|
||||
<view v-show="options[current].questiontype === '1'" class="options">
|
||||
<view class="item" :class="{ 'active': options[current].checked === 'A' }" @click="fnChooseTopic('radio', 'A')">
|
||||
<text class="option">A</text>
|
||||
<text class="text">{{ options[current].optiona }}</text>
|
||||
</view>
|
||||
<view class="item" :class="{ 'active': options[current].checked === 'B' }" @click="fnChooseTopic('radio', 'B')">
|
||||
<text class="option">B</text>
|
||||
<text class="text">{{ options[current].optionb }}</text>
|
||||
</view>
|
||||
<view class="item" :class="{ 'active': options[current].checked === 'C' }" @click="fnChooseTopic('radio', 'C')">
|
||||
<text class="option">C</text>
|
||||
<text class="text">{{ options[current].optionc }}</text>
|
||||
</view>
|
||||
<view class="item" :class="{ 'active': options[current].checked === 'D' }" @click="fnChooseTopic('radio', 'D')">
|
||||
<text class="option">D</text>
|
||||
<text class="text">{{ options[current].optiond }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-show="options[current].questiontype === '2'" class="options">
|
||||
<view
|
||||
class="item"
|
||||
:class="{
|
||||
'active': options[current].checked && options[current].checked.indexOf('A') !== -1
|
||||
}"
|
||||
@click="fnChooseTopic('multiple', 'A')"
|
||||
>
|
||||
<text class="option">A</text>
|
||||
<text class="text">{{ options[current].optiona }}</text>
|
||||
</view>
|
||||
<view
|
||||
class="item"
|
||||
:class="{
|
||||
'active': options[current].checked && options[current].checked.indexOf('B') !== -1
|
||||
}"
|
||||
@click="fnChooseTopic('multiple', 'B')"
|
||||
>
|
||||
<text class="option">B</text>
|
||||
<text class="text">{{ options[current].optionb }}</text>
|
||||
</view>
|
||||
<view
|
||||
class="item"
|
||||
:class="{
|
||||
'active': options[current].checked && options[current].checked.indexOf('C') !== -1
|
||||
}"
|
||||
@click="fnChooseTopic('multiple', 'C')"
|
||||
>
|
||||
<text class="option">C</text>
|
||||
<text class="text">{{ options[current].optionc }}</text>
|
||||
</view>
|
||||
<view
|
||||
class="item"
|
||||
:class="{
|
||||
'active': options[current].checked && options[current].checked.indexOf('D') !== -1
|
||||
}"
|
||||
@click="fnChooseTopic('multiple', 'D')"
|
||||
>
|
||||
<text class="option">D</text>
|
||||
<text class="text">{{ options[current].optiond }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-show="options[current].questiontype === '3'" class="options">
|
||||
<view class="item" :class="{ 'active': options[current].checked === 'A' }" @click="fnChooseTopic('judge', 'A')">
|
||||
<text class="option">{{ options[current].optiona }}</text>
|
||||
<text class="text"></text>
|
||||
</view>
|
||||
<view class="item" :class="{ 'active': options[current].checked === 'B' }" @click="fnChooseTopic('judge', 'B')">
|
||||
<text class="option">{{ options[current].optionb }}</text>
|
||||
<text class="text"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-show="options[current].questiontype === '4'" class="options">
|
||||
<view class="item">
|
||||
<u-textarea v-model="options[current].checked" auto-height count/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footer">
|
||||
<u-button v-show="current !== 0" :style="{ width: '45%' }" text="上一题" @click="fnPreviousQuestion"/>
|
||||
<u-button v-show="current !== options.length - 1" type="primary"
|
||||
:style="{ width: current === 0 ? '100%' : '45%' }" text="下一题" @click="fnNextQuestion"/>
|
||||
<u-button v-show="current === options.length - 1" type="primary" :style="{ width: '45%' }" text="交卷"
|
||||
@click="fnHandInThePaper"/>
|
||||
</view>
|
||||
|
||||
<u-toast ref="uToast"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getExamExercises,
|
||||
// getStrengthenExam,
|
||||
setTestPaperSubmission,
|
||||
} from '@/api';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
routeQuery: {},
|
||||
entrySite: '',
|
||||
info: {},
|
||||
options: [{}],
|
||||
current: 0,
|
||||
questionTypeMap: {
|
||||
1: '单选',
|
||||
2: '多选',
|
||||
3: '判断',
|
||||
4: '填空'
|
||||
},
|
||||
studentId:''
|
||||
}
|
||||
},
|
||||
onLoad(query) {
|
||||
this.routeQuery = query
|
||||
// this.STAGEEXAMPAPER_ID = query.STAGEEXAMPAPER_ID;
|
||||
// this.entrySite = query.entrySite;
|
||||
this.fnGetData()
|
||||
},
|
||||
onBackPress(event) {
|
||||
if (event.from === 'backbutton') {
|
||||
uni.$u.toast('考试过程中不允许退出')
|
||||
return true
|
||||
}
|
||||
return false
|
||||
},
|
||||
methods: {
|
||||
async fnGetData() {
|
||||
const {stageexampaperinputId, classId, } = this.routeQuery
|
||||
const resData = await getExamExercises({
|
||||
stageexampaperinputId: stageexampaperinputId,
|
||||
classId: classId,
|
||||
})
|
||||
this.info = resData.info
|
||||
this.options = resData.inputQue
|
||||
this.studentId = resData.student.studentId
|
||||
if (resData.numberofexams > 0) {
|
||||
uni.showModal({
|
||||
title: "温馨提示",
|
||||
content: `您还可以考试${resData.numberofexams}次!`,
|
||||
showCancel: false,
|
||||
});
|
||||
}
|
||||
},
|
||||
fnChooseTopic(type, checked) {
|
||||
if (!this.options[this.current].checked) {
|
||||
this.$set(this.options[this.current], 'checked', '')
|
||||
}
|
||||
if (type === 'judge' || type === 'radio') {
|
||||
if (this.options[this.current].checked === checked) {
|
||||
this.options[this.current].checked = ''
|
||||
} else {
|
||||
this.options[this.current].checked = checked
|
||||
}
|
||||
}
|
||||
if (type === 'multiple') {
|
||||
if (this.options[this.current].checked) {
|
||||
const checkedArr = this.options[this.current].checked.split(',')
|
||||
if (checkedArr.indexOf(checked) !== -1) {
|
||||
checkedArr.splice(checkedArr.indexOf(checked), 1)
|
||||
this.options[this.current].checked = checkedArr.join(',')
|
||||
} else {
|
||||
checkedArr.push(checked)
|
||||
checkedArr.sort()
|
||||
this.options[this.current].checked = checkedArr.join(',')
|
||||
}
|
||||
} else {
|
||||
this.options[this.current].checked = checked
|
||||
}
|
||||
}
|
||||
},
|
||||
handleCalcQuestType(type) {
|
||||
return `(${this.questionTypeMap[type]})`
|
||||
},
|
||||
fnIsFinish() {
|
||||
if (!this.options[this.current].checked) {
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: '请对本题进行作答。',
|
||||
showCancel: false
|
||||
})
|
||||
return false
|
||||
}
|
||||
return true
|
||||
},
|
||||
/**
|
||||
* 下一题按钮点击事件
|
||||
*/
|
||||
fnNextQuestion() {
|
||||
if (!this.fnIsFinish()) return
|
||||
this.current++
|
||||
},
|
||||
/**
|
||||
* 上一题按钮点击事件
|
||||
*/
|
||||
fnPreviousQuestion() {
|
||||
this.current--
|
||||
},
|
||||
/**
|
||||
* 交卷按钮点击事件
|
||||
*/
|
||||
fnHandInThePaper() {
|
||||
if (!this.fnIsFinish()) return
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: `题目已全部做完,确认交卷吗?`,
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.fnSubmit()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
fnCountDownFinish() {
|
||||
uni.$u.toast('考试时间已结束')
|
||||
for (let i = 0; i < this.options.length; i++) {
|
||||
if (!this.options[i].checked) {
|
||||
this.options[i].checked = ''
|
||||
}
|
||||
}
|
||||
this.fnSubmit()
|
||||
},
|
||||
async fnSubmit() {
|
||||
const {stageexampaperinputId, classId, } = this.routeQuery
|
||||
for (let i = 0; i < this.options.length; i++) {
|
||||
if (this.options[i].questiontype === "2") {
|
||||
this.options[i].checked = this.options[i].checked.replace(/,/g, "");
|
||||
}
|
||||
}
|
||||
const resData = await setTestPaperSubmission({
|
||||
stageexampaperinputId: stageexampaperinputId,
|
||||
classId: classId,
|
||||
studentId: this.studentId,
|
||||
passscore: this.info.passscore,
|
||||
options: JSON.stringify(this.options),
|
||||
});
|
||||
if (resData.examResult === "0") {
|
||||
uni.showModal({
|
||||
title: "温馨提示",
|
||||
content: `您的成绩为${resData.examScore}分,很遗憾您没有通过本次考试,请再接再厉!`,
|
||||
showCancel: false,
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.navigateBack({delta: 2});
|
||||
}
|
||||
},
|
||||
});
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: "温馨提示",
|
||||
content: `您的成绩为${resData.examScore}分,恭喜您通过本次考试,请继续保持!`,
|
||||
showCancel: false,
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.navigateBack({delta: 2});
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.content {
|
||||
.top {
|
||||
margin: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
padding: 40rpx;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.suject {
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.questions {
|
||||
color: #eeecec;
|
||||
font-size: 30rpx;
|
||||
padding-top: 20rpx;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.time {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #eeecec;
|
||||
font-size: 28rpx;
|
||||
padding-top: 20rpx;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
|
||||
::v-deep {
|
||||
.u-count-down__text {
|
||||
color: #eeecec;
|
||||
font-size: 28rpx;
|
||||
line-height: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.topic {
|
||||
margin: 20rpx;
|
||||
padding: 20rpx 20rpx 150rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
|
||||
.question-type {
|
||||
border-radius: 40rpx;
|
||||
padding: 4rpx 14rpx;
|
||||
border: 1rpx solid #3c9cff;
|
||||
font-size: 24rpx;
|
||||
color: #3c9cff;
|
||||
}
|
||||
|
||||
.tag_title {
|
||||
font-size: 28rpx;
|
||||
background-color: #b3b3b3;
|
||||
color: #fff;
|
||||
border-radius: 8rpx;
|
||||
padding: 2rpx 10rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.options {
|
||||
margin-top: 40rpx;
|
||||
|
||||
.item {
|
||||
position: relative;
|
||||
margin-top: 40rpx;
|
||||
color: #696868;
|
||||
|
||||
&.active {
|
||||
color: #3c9cff;
|
||||
|
||||
.option {
|
||||
background-color: #3c9cff;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.option {
|
||||
background-color: #eee;
|
||||
border-radius: 80rpx;
|
||||
width: 65rpx;
|
||||
height: 65rpx;
|
||||
line-height: 65rpx;
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.text {
|
||||
margin-left: 30rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
display: flex;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
background: #fff;
|
||||
|
||||
button {
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,274 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="content__titletop">
|
||||
<view class="content__title">试卷名称:{{info.examname}}</view>
|
||||
<view class="content__subtitle">(满分: {{info.paperexamscore}}分)</view>
|
||||
<view class="content__subtitle">(合格分: {{info.passscore}}分)</view>
|
||||
</view>
|
||||
|
||||
<view class="content__info">
|
||||
<view>姓名: {{info.username}}</view>
|
||||
<view>分数: {{info.examscore}}分</view>
|
||||
<view>考试时间: {{info.examtimeend}}</view>
|
||||
</view>
|
||||
|
||||
<view class="content__sign">
|
||||
<view style="margin-right: 10rpx">签字: </view>
|
||||
<u-image width="120rpx" height="70rpx" model="widthFix" :src="$filePath + info.signaturePath" @click="previewImage" />
|
||||
</view>
|
||||
|
||||
<view class="counter">
|
||||
当前试题: <text style="color: orange">{{ current + 1 }}</text>/{{ questionList.length }}
|
||||
</view>
|
||||
|
||||
<view class="topic">
|
||||
<view class="title">
|
||||
<text class="tag_title">
|
||||
{{ handleCalcQuestType(questionList[current].questiontype) }}
|
||||
</text>
|
||||
{{ current + 1 }}.
|
||||
<text>{{ questionList[current].questiondry }}</text>
|
||||
</view>
|
||||
<view v-if="questionList[current].questiontype === '1'" class="options">
|
||||
<view v-for="(item, index) in ['A', 'B', 'C', 'D']" :key="index" :class="['item', questionList[current].answer === item ? 'active' : '']">
|
||||
<text class="option">{{ item }}</text>
|
||||
<text class="text">
|
||||
{{ questionList[current]['option' + item.toLocaleLowerCase()] }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="questionList[current].questiontype === '2'" class="options">
|
||||
<view v-for="(item, index) in ['A', 'B', 'C', 'D']" :key="index" :class="['item', questionList[current].answer && questionList[current].answer.indexOf(item) !== -1 ? 'active' : '']">
|
||||
<text class="option">{{ item }}</text>
|
||||
<text class="text">
|
||||
{{ questionList[current]['option' + item.toLocaleLowerCase()] }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="questionList[current].questiontype === '3'" class="options">
|
||||
<view v-for="(item, index) in ['A', 'B']" :key="index" :class="['item', questionList[current].answer === item ? 'active' : '']">
|
||||
<text class="option">
|
||||
{{ questionList[current]['option' + item.toLocaleLowerCase()] }}
|
||||
</text>
|
||||
<text class="text"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="correct-answer">
|
||||
<text>正确答案</text>
|
||||
<view v-if="questionList[current].questiontype === '3'">
|
||||
{{ questionList[current].answerright === 'A' ? '对' : '错' }}
|
||||
</view>
|
||||
<view v-else>{{ questionList[current].answerright || '无' }}</view>
|
||||
<text>权威解读</text>
|
||||
<view>{{ questionList[current].descr || "无" }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="footer">
|
||||
<block v-if="current !== 0">
|
||||
<u-button
|
||||
shape="circle"
|
||||
:custom-style="{
|
||||
width: current === questionList.length - 1 ? '100%' : '45%'
|
||||
}"
|
||||
text="上一题"
|
||||
@click="current--"
|
||||
/>
|
||||
</block>
|
||||
<block v-if="current !== questionList.length - 1">
|
||||
<u-button
|
||||
shape="circle"
|
||||
type="primary"
|
||||
:custom-style="{
|
||||
width: current === 0 ? '100%' : '45%',
|
||||
marginLeft: current === 0 ? '0' : '10%'
|
||||
}"
|
||||
text="下一题"
|
||||
@click="current++"
|
||||
/>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getTaskScoreInfo } from "@/api";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
info:{},
|
||||
questionList: [],
|
||||
current: 0, // 新增当前激活的题目索引
|
||||
questionTypeMap: {
|
||||
1: '单选题',
|
||||
2: '多选题',
|
||||
3: '判断题',
|
||||
4: '填空题',
|
||||
5: '简答题'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(query) {
|
||||
const { stagestudentrelationId, classId } = query
|
||||
this.getData(stagestudentrelationId, classId)
|
||||
},
|
||||
|
||||
mounted() {},
|
||||
|
||||
methods: {
|
||||
async getData(stagestudentrelationId, classId) {
|
||||
const resData = await getTaskScoreInfo({
|
||||
stagestudentrelationId,
|
||||
classId
|
||||
})
|
||||
this.questionList = resData.pd.questionList
|
||||
this.info = resData.pd
|
||||
},
|
||||
handleCalcQuestType(type) {
|
||||
return `(${this.questionTypeMap[type]})`
|
||||
},
|
||||
previewImage(){
|
||||
uni.previewImage({
|
||||
urls: [this.$filePath + this.info.signaturePath],
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.content {
|
||||
padding: 16rpx;
|
||||
|
||||
.content__titletop {
|
||||
text-align: center;
|
||||
|
||||
.content__title {
|
||||
font-size: 34rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.content__subtitle {
|
||||
margin-top: 8rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.content__info {
|
||||
font-size: 34rpx;
|
||||
view{
|
||||
margin-top: 18rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.content__sign {
|
||||
margin-top: 18rpx;
|
||||
font-size: 34rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.counter {
|
||||
font-size: 28rpx;
|
||||
margin: 15rpx 0;
|
||||
text-align: end;
|
||||
}
|
||||
|
||||
.topic {
|
||||
box-sizing: border-box;
|
||||
|
||||
.tag_title {
|
||||
font-size: 28rpx;
|
||||
background-color: #fff;
|
||||
color: #5ac725;
|
||||
border-radius: 8rpx;
|
||||
padding: 2rpx 8rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
|
||||
.question-type {
|
||||
border-radius: 40rpx;
|
||||
padding: 4rpx 14rpx;
|
||||
border: 1rpx solid #3c9cff;
|
||||
font-size: 28rpx;
|
||||
color: #3c9cff;
|
||||
}
|
||||
}
|
||||
|
||||
.options {
|
||||
margin-top: 40rpx;
|
||||
|
||||
.item {
|
||||
position: relative;
|
||||
margin-top: 40rpx;
|
||||
color: #696868;
|
||||
|
||||
&.active {
|
||||
color: #3c9cff;
|
||||
|
||||
.option {
|
||||
background-color: #3c9cff;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.option {
|
||||
background-color: #eee;
|
||||
border-radius: 80rpx;
|
||||
width: 65rpx;
|
||||
height: 65rpx;
|
||||
line-height: 65rpx;
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.text {
|
||||
margin-left: 30rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.correct-answer {
|
||||
margin-top: 40rpx;
|
||||
|
||||
text {
|
||||
display: inline-block;
|
||||
margin-top: 40rpx;
|
||||
color: #696868;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
view {
|
||||
margin-top: 20rpx;
|
||||
color: #333;
|
||||
padding: 20rpx;
|
||||
background-color: #eee;
|
||||
border-radius: 10rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
background: #fff;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,205 @@
|
|||
<template>
|
||||
<view class="container">
|
||||
<view class="fat">
|
||||
<text class="fatt">请将人脸置于圆圈内</text>
|
||||
</view>
|
||||
<view class="livefater">
|
||||
<view style="width: 700upx; height: 700upx; border-radius: 700upx; overflow: hidden">
|
||||
<live-pusher id="livePusher" ref="livePusher" class="livePusher" url="" mode="SD" :muted="true" :enable-camera="true" :auto-focus="true" :beauty="1" whiteness="2" aspect="1:1" />
|
||||
</view>
|
||||
<cover-image src="/static/images/gaiz.png" class="gaiimg"></cover-image>
|
||||
</view>
|
||||
|
||||
<view style="margin: 0 100upx">
|
||||
<u-button :text="btnTextStr" type="primary" @click="snapshot" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import {setMeetingFace, setScanCodeToVerifyFace, setUserFace, setVerifyFace} from "@/api";
|
||||
import { submitEditUserFace, compareUserFaceCertify, compareUserExamFaceCertify } from '@/api';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
startPreviewTimer: null, // 开始预览计时器实例
|
||||
isFirst: '', // 是否为第一次开启摄像头
|
||||
type: '', // 摄像头使用类别
|
||||
// showButton: "yes",
|
||||
routeQueryparams: {}, // 额外携带的参数
|
||||
btnTextStr: '拍照'
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
this.context = uni.createLivePusherContext('livePusher', this)
|
||||
this.startPreviewTimer = setInterval(() => {
|
||||
this.startPreview()
|
||||
}, 1000)
|
||||
},
|
||||
onLoad(query) {
|
||||
// facial_input 人脸认证 isFirst 1 第一次登录添加人脸
|
||||
// scan_face 扫码
|
||||
// update_facial_input 更新人脸
|
||||
// learning_certification 学习认证
|
||||
// meeting_attendance 会议签到
|
||||
const typeKey = ['facial_input', 'scan_face', 'learning_certification', 'update_facial_input']
|
||||
if (!typeKey.includes(query.type)) {
|
||||
uni.$u.toast('type参数错误')
|
||||
return
|
||||
}
|
||||
this.isFirst = query.isFirst || ''
|
||||
if (query.type === 'facial_input' || 'update_facial_input') this.btnTextStr = '人脸认证'
|
||||
if (query.type === 'scan_face') this.btnTextStr = '签到'
|
||||
if (query.type === 'learning_certification') this.btnTextStr = '开始考试'
|
||||
this.type = query.type
|
||||
// this.showButton = query.showButton || "yes";
|
||||
this.routeQueryparams = query ?? {}
|
||||
},
|
||||
onBackPress(event) {
|
||||
if (event.from === 'backbutton') {
|
||||
if ((this.type === 'scan_face' && this.isFirst === '1') || this.type === 'learning_certification' || this.type === 'facial_input') {
|
||||
uni.$u.toast('请完成人脸验证')
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
},
|
||||
onUnload() {
|
||||
this.startPreviewTimer && clearInterval(this.startPreviewTimer)
|
||||
},
|
||||
methods: {
|
||||
snapshot() {
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
})
|
||||
this.context.snapshot({
|
||||
success: (e) => {
|
||||
this.getMinImage(e.message.tempImagePath)
|
||||
}
|
||||
})
|
||||
},
|
||||
startPreview() {
|
||||
this.context.stopPreview()
|
||||
this.context.startPreview({
|
||||
success: () => {
|
||||
this.startPreviewTimer && clearInterval(this.startPreviewTimer)
|
||||
// this.showButton === "no" && this.snapshot();
|
||||
}
|
||||
})
|
||||
},
|
||||
getMinImage(imgPath) {
|
||||
plus.zip.compressImage(
|
||||
{
|
||||
src: imgPath,
|
||||
dst: imgPath,
|
||||
overwrite: true,
|
||||
quality: 40
|
||||
},
|
||||
(zipRes) => {
|
||||
setTimeout(() => {
|
||||
const reader = new plus.io.FileReader()
|
||||
reader.onloadend = async (res) => {
|
||||
const speech = res.target.result
|
||||
// 获取 base 64 图片编码的前缀
|
||||
const USERAVATARPREFIX = speech.substring(0, speech.indexOf('base64,') + 7)
|
||||
// 获取 base 64 图片的二进制到文本
|
||||
const USERAVATARURL = speech.substring(speech.indexOf('base64,') + 7)
|
||||
try {
|
||||
const otherParams = {
|
||||
...this.routeQueryparams
|
||||
}
|
||||
delete otherParams.type
|
||||
if (this.type === 'facial_input' || this.type === 'update_facial_input') {
|
||||
await submitEditUserFace({
|
||||
...otherParams,
|
||||
USERAVATARPREFIX,
|
||||
USERAVATARURL
|
||||
})
|
||||
await this.$store.dispatch('setVerification', '1')
|
||||
uni.$u.toast('人脸信息认证成功')
|
||||
setTimeout(() => {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}, 1000)
|
||||
} else if (this.type === 'scan_face') {
|
||||
await compareUserFaceCertify({
|
||||
...otherParams,
|
||||
USERAVATARPREFIX,
|
||||
USERAVATARURL
|
||||
})
|
||||
uni.$u.toast('人脸认证成功')
|
||||
setTimeout(() => {
|
||||
uni.navigateBack({
|
||||
delta: 2
|
||||
})
|
||||
}, 1000)
|
||||
} else if (this.type === 'learning_certification') {
|
||||
const res = await compareUserExamFaceCertify({
|
||||
...otherParams,
|
||||
USERAVATARPREFIX,
|
||||
USERAVATARURL
|
||||
})
|
||||
await uni.$u.toast('人脸认证成功, 请进入考试答题')
|
||||
setTimeout(() => {
|
||||
uni.$u.route({
|
||||
url: '/pages/train_management/course_exam',
|
||||
params: {
|
||||
...this.routeQueryparams
|
||||
}
|
||||
})
|
||||
}, 1000)
|
||||
}
|
||||
} catch (e) {
|
||||
console.log('扫描人脸过程中捕获的错误 :>>> ', e)
|
||||
if (e && e.msg) {
|
||||
uni.$u.toast(e.msg)
|
||||
}
|
||||
// this.showButton === "no" && this.snapshot();
|
||||
}
|
||||
}
|
||||
reader.readAsDataURL(plus.io.convertLocalFileSystemURL(zipRes.target))
|
||||
}, 4000)
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.container {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.livePusher {
|
||||
width: 700upx;
|
||||
height: 700upx;
|
||||
}
|
||||
|
||||
.livefater {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-bottom: 100upx;
|
||||
height: 700upx;
|
||||
}
|
||||
|
||||
.fat {
|
||||
margin: 100upx;
|
||||
}
|
||||
|
||||
.fatt {
|
||||
text-align: center;
|
||||
font-size: 36upx;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.gaiimg {
|
||||
width: 700upx;
|
||||
height: 700upx;
|
||||
margin-top: -700upx;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,258 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<u-list @scrolltolower="scrolltolower" v-if="trainList.length > 0">
|
||||
<u-list-item v-for="(item, index) in trainList" :key="index">
|
||||
<view class="container_item">
|
||||
<view class="container_item_name">
|
||||
<text>{{ item.name }}</text>
|
||||
</view>
|
||||
|
||||
<view class="container_item_content">
|
||||
<view class="content_text">
|
||||
<view>
|
||||
<text class="content_label">所属单位: </text>
|
||||
<text class="content_value">{{ item.corpinfoName }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_text">
|
||||
<view>
|
||||
<text class="content_label">培训开始时间: </text>
|
||||
<text class="content_value">{{ item.startTime }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_text">
|
||||
<view>
|
||||
<text class="content_label">培训结束时间: </text>
|
||||
<text class="content_value">{{ item.endTime }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_text">
|
||||
<view class="content_bottom">
|
||||
<view> <text class="content_label">任务状态: </text>{{ handleCalcTaskStatus(item.state) }} </view>
|
||||
<view class="action-row">
|
||||
<u-button size="mini" type="primary" text="签到信息" :disabled="item.userSignPath === '0'" @click="signInInformation(item.classId)" />
|
||||
<u-button size="mini" type="primary" text="考试记录" :disabled="item.stageexamstate === '1' || item.stageexamstate === '4'" @click="ExamRecord(item)" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-list-item>
|
||||
</u-list>
|
||||
|
||||
<empty v-else></empty>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getClassList, getIsUploadFace } from '@/api';
|
||||
import store from '@/store/index';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
verification: store.state.verification, // 本地读取人脸检测验证状态
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
totalPage: 0,
|
||||
trainList: [],
|
||||
taskStatusMap: {
|
||||
1: '待完善',
|
||||
4: '待开班',
|
||||
5: '培训中',
|
||||
6: '培训结束'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/* 监听页面显示,页面每次出现在屏幕上都触发,包括从下级页面点返回露出当前页面 */
|
||||
async onShow() {
|
||||
await this.getUserFaceCompleted()
|
||||
await this.resetList()
|
||||
},
|
||||
|
||||
async onLoad(query) {
|
||||
// await this.getUserFaceCompleted()
|
||||
// await this.resetList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
async resetList() {
|
||||
this.pageSize = 10
|
||||
this.currentPage = 1
|
||||
this.trainList = []
|
||||
await this.getData()
|
||||
},
|
||||
async getData() {
|
||||
// verification --> 0: 未完成人脸认证
|
||||
// verification --> 1: 已完成人脸认证
|
||||
if (this.verification === '1') {
|
||||
let resData = await getClassList({
|
||||
showCount: this.pageSize,
|
||||
currentPage: this.currentPage
|
||||
})
|
||||
this.trainList = [...this.trainList, ...resData.page.list]
|
||||
this.totalPage = resData.page.totalPage
|
||||
}
|
||||
},
|
||||
scrolltolower() {
|
||||
this.currentPage++
|
||||
if (this.totalPage >= this.currentPage) this.getData()
|
||||
},
|
||||
/**
|
||||
* 右上角自定义扫码图标触发事件
|
||||
*/
|
||||
onNavigationBarButtonTap(e) {
|
||||
// 只允许通过手机相机扫码
|
||||
uni.scanCode({
|
||||
// scanType: ['qrCode'], // 仅支持二维码扫码
|
||||
onlyFromCamera: false, // 是否只能从相机扫码,允许从相册选择图片
|
||||
hideAlbum: false, // 显示相册,允许从相册选择图片
|
||||
success: (response) => {
|
||||
const { stageexampaperinputId, classId, type, } = JSON.parse(response.result)
|
||||
const findClassId = this.trainList.some((item) => item.classId === classId)
|
||||
if (type === '0') {
|
||||
// 签到二维码方式进入
|
||||
if (findClassId) {
|
||||
uni.$u.route({
|
||||
url: '/pages/train_management/realname_info_auth',
|
||||
params: {
|
||||
type: 'scan_face',
|
||||
classId
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.$u.toast('您未在培训计划内,无法入班签到,请联系教师')
|
||||
}
|
||||
} else if (type === '1') {
|
||||
// 考试二维码方式进入
|
||||
if (findClassId) {
|
||||
uni.$u.route({
|
||||
url: '/pages/train_management/face_authentication',
|
||||
params: {
|
||||
type: 'learning_certification',
|
||||
stageexampaperinputId,
|
||||
classId,
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.$u.toast('您未在培训计划内,无法进行考试,请联系教师')
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: function (error) {
|
||||
console.log('error :>> ', error)
|
||||
},
|
||||
complete: function (result) {
|
||||
console.log('扫码完成,正在跳转功能页!')
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取是否已经完成上传人脸信息
|
||||
*/
|
||||
async getUserFaceCompleted() {
|
||||
// const userFaceData = await getIsUploadFace()
|
||||
// verification --> 0: 未完成人脸认证
|
||||
// verification --> 1: 已完成人脸认证
|
||||
if (this.verification === '0') {
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: '检测到您还未完成人脸信息读取,请先完成人脸信息认证!',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
uni.$u.route({
|
||||
url: '/pages/train_management/face_authentication',
|
||||
params: {
|
||||
type: 'facial_input'
|
||||
}
|
||||
})
|
||||
}
|
||||
if (res.cancel) {
|
||||
uni.navigateBack({ delta: 1 })
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
handleCalcTaskStatus(type) {
|
||||
return this.taskStatusMap[type]
|
||||
},
|
||||
/**
|
||||
* 签到信息
|
||||
*/
|
||||
signInInformation(classId) {
|
||||
uni.$u.route({
|
||||
url: '/pages/train_management/sign_information',
|
||||
params: {
|
||||
classId
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 考试记录
|
||||
*/
|
||||
ExamRecord(record) {
|
||||
const { stagestudentrelationId, classId } = record
|
||||
uni.$u.route({
|
||||
url: '/pages/train_management/exam_record',
|
||||
params: {
|
||||
classId,
|
||||
stagestudentrelationId
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.container_item {
|
||||
padding-left: 16rpx;
|
||||
|
||||
.container_item_name {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.container_item_content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8rpx;
|
||||
|
||||
.content_text {
|
||||
color: #acafb3;
|
||||
font-size: 30rpx;
|
||||
|
||||
.content_label {
|
||||
display: inline-block;
|
||||
width: 220rpx;
|
||||
}
|
||||
|
||||
.content_value {
|
||||
display: inline-block;
|
||||
transform: translateY(8rpx);
|
||||
padding: 0;
|
||||
width: 452rpx;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.content_bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.action-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 16rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,302 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="top-title">学员信息</view>
|
||||
|
||||
<u-gap height="20" bgColor="#f2f2f2" />
|
||||
|
||||
<view class="content_body">
|
||||
<u--form labelPosition="left" :model="ruleFormData" :rules="rules" ref="uFormRef">
|
||||
<u-form-item labelWidth="70" label="姓名" prop="userInfo.name" borderBottom required>
|
||||
<u--input v-model="ruleFormData.userInfo.name" placeholder="请输入姓名..." border="none"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="80" label="联系电话" prop="userInfo.phone" borderBottom required>
|
||||
<u--input v-model="ruleFormData.userInfo.phone" type="number" placeholder="请输入联系电话..." border="none"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="80" label="身份证号" prop="userInfo.userIdCard" borderBottom required>
|
||||
<u--input v-model="ruleFormData.userInfo.userIdCard" placeholder="请输入身份证号..." border="none"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="70" label="性别" prop="userInfo.sex" borderBottom required>
|
||||
<u-radio-group v-model="ruleFormData.userInfo.sex" placement="row" class="radio-group__style">
|
||||
<u-radio v-for="(item, index) in sexsList" :key="index" :label="item.name" :name="item.name"> </u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="70" label="学历" prop="userInfo.degreeOfEducation" borderBottom required @click="handleEducationClick">
|
||||
<u--input v-model="ruleFormData.userInfo.degreeOfEducation" readonly placeholder="请选择学历..." border="none"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="70" label="职业" prop="userInfo.job" borderBottom required>
|
||||
<u--input v-model="ruleFormData.userInfo.job" placeholder="请输入职业..." border="none"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="125" label="职业资格等级证书" prop="userInfo.gradeCertificate" borderBottom required>
|
||||
<u-upload :fileList="ruleFormData.userInfo.gradeCertificate" previewFullImage @afterRead="afterRead" @delete="deletePic" name="1" multiple :maxCount="1"></u-upload>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="120" label="获得证书时间" prop="userInfo.certificateAcquisitionTime" borderBottom required @click="showCertificateGetTime">
|
||||
<u--input v-model="ruleFormData.userInfo.certificateAcquisitionTime" readonly placeholder="请选择获得证书时间..." border="none"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="手写签字" prop="userInfo.writeSign" borderBottom required labelPosition="top" labelWidth="auto">
|
||||
<view style="flex: 1">
|
||||
<u-button type="primary" size="mini" text="签字" :customStyle="{ position: 'absolute', top: '-46upx', right: '20upx', width: '100upx' }" @click="signVisible = true" />
|
||||
<view v-if="ruleFormData.userInfo.writeSign">
|
||||
<u-image width="400rpx" height="200rpx" :src="ruleFormData.userInfo.writeSign" />
|
||||
</view>
|
||||
</view>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
|
||||
<view class="mt-10">
|
||||
<u-button type="primary" text="下一步" @click="$u.debounce(fnSubmit, 1000, true)" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<sign :signShow.sync="signVisible" @confirm="handleSign" />
|
||||
<u-datetime-picker
|
||||
:show="showCertificateGetTimePopper"
|
||||
mode="datetime"
|
||||
v-model="defaultDatetimePicker"
|
||||
:round="12"
|
||||
:custom-style="{
|
||||
borderRadius: '24rpx',
|
||||
overflow: 'hidden',
|
||||
'--picker-header-radius': '24rpx 24rpx 0 0',
|
||||
'--picker-confirm-radius': '12rpx'
|
||||
}"
|
||||
@confirm="handleCertificateGetTimeConfirm"
|
||||
@cancel="handleCertificateGetTimeCancel"
|
||||
></u-datetime-picker>
|
||||
|
||||
<u-picker ref="uPicker" :show="singleChoice" :columns="singleChoiceColumns" keyName="NAME" @confirm="fnSingleChoiceConfirm" @cancel="fnSingleChoiceCancel"></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getDataDictionary, joinClass } from '@/api';
|
||||
import Sign from '@/components/sign/sign.vue'
|
||||
import { validateFieldPhone, validateFieldIdCard } from '@/utils/formValidateField.js'
|
||||
import store from "@/store";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
routeQuery: {}, // 上一个页面带过来的路由参数
|
||||
sexsList: [
|
||||
{
|
||||
label: '1',
|
||||
name: '男'
|
||||
},
|
||||
{
|
||||
label: '0',
|
||||
name: '女'
|
||||
}
|
||||
],
|
||||
singleChoice: false,
|
||||
showCertificateGetTimePopper: false,
|
||||
signVisible: false,
|
||||
defaultDatetimePicker: Number(new Date()),
|
||||
singleChoiceColumns: [],
|
||||
ruleFormData: {
|
||||
userInfo: {
|
||||
name: '', // 姓名
|
||||
phone: '', // 联系电话
|
||||
userIdCard: '', // 身份证号
|
||||
sex: '男', // 性别
|
||||
degreeOfEducation: '', // 学历
|
||||
job: '', // 职业
|
||||
gradeCertificate: [], // 等级证书
|
||||
certificateAcquisitionTime: '', // 获取证书时间
|
||||
writeSign: '' // 手写签字
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
'userInfo.name': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请填写姓名',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'userInfo.phone': [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入手机号',
|
||||
trigger: ['change', 'blur']
|
||||
},
|
||||
{
|
||||
validator: validateFieldPhone,
|
||||
trigger: ['change', 'blur']
|
||||
}
|
||||
],
|
||||
'userInfo.userIdCard': [
|
||||
{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请填写身份证号',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
{
|
||||
validator: validateFieldIdCard,
|
||||
trigger: ['change', 'blur']
|
||||
}
|
||||
],
|
||||
'userInfo.sex': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请选择性别',
|
||||
trigger: ['change']
|
||||
},
|
||||
'userInfo.degreeOfEducation': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请选择学历',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'userInfo.job': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请输入职业',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'userInfo.gradeCertificate': [
|
||||
{
|
||||
type: 'array',
|
||||
required: true,
|
||||
message: '请上传等级证书',
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
],
|
||||
'userInfo.certificateAcquisitionTime': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请选择获取证书时间',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'userInfo.writeSign': [
|
||||
{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请填写手写签字',
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(query) {
|
||||
this.routeQuery = query // 接收上一个页面传递过来的路由参数1
|
||||
},
|
||||
|
||||
methods: {
|
||||
handleEducationClick() {
|
||||
this.$refs.uPicker.setIndexs([0])
|
||||
this.fnGetDataDictionary('d7d80f08d73a4accbccf4fd3d8d1d867')
|
||||
this.singleChoice = true
|
||||
},
|
||||
fnSingleChoiceConfirm(event) {
|
||||
this.$set(this.ruleFormData.userInfo, 'degreeOfEducation', event.value[0].NAME)
|
||||
this.$set(this.ruleFormData.userInfo, 'degreeOfEducation' + '_BIANMA', event.value[0].BIANMA)
|
||||
this.fnSingleChoiceCancel()
|
||||
},
|
||||
fnSingleChoiceCancel() {
|
||||
this.singleChoice = false
|
||||
},
|
||||
async fnGetDataDictionary(DICTIONARIES_ID) {
|
||||
let resData = await getDataDictionary({
|
||||
DICTIONARIES_ID
|
||||
})
|
||||
this.singleChoiceColumns = [resData.list]
|
||||
},
|
||||
handleSelectEducation(event) {
|
||||
this.ruleFormData.userInfo.degreeOfEducation = event.name
|
||||
},
|
||||
async afterRead(event) {
|
||||
let lists = [].concat(event.file)
|
||||
lists.map((item) => {
|
||||
this.ruleFormData.userInfo.gradeCertificate.push({
|
||||
...item,
|
||||
status: 'success',
|
||||
message: ''
|
||||
})
|
||||
})
|
||||
},
|
||||
deletePic(event) {
|
||||
this.ruleFormData.userInfo.gradeCertificate.splice(event.index, 1)
|
||||
},
|
||||
showCertificateGetTime() {
|
||||
this.showCertificateGetTimePopper = true
|
||||
},
|
||||
handleCertificateGetTimeConfirm(event) {
|
||||
this.ruleFormData.userInfo.certificateAcquisitionTime = uni.$u.timeFormat(event.value, 'yyyy-mm-dd hh:MM')
|
||||
this.handleCertificateGetTimeCancel()
|
||||
},
|
||||
handleCertificateGetTimeCancel() {
|
||||
this.showCertificateGetTimePopper = false
|
||||
},
|
||||
handleSign(event) {
|
||||
this.ruleFormData.userInfo.writeSign = event.filePath
|
||||
},
|
||||
async fnSubmit() {
|
||||
const classId = this.routeQuery.classId
|
||||
await this.$refs.uFormRef
|
||||
.validate()
|
||||
.then(async () => {
|
||||
let files = []
|
||||
if (this.ruleFormData.userInfo.gradeCertificate[0]) {
|
||||
files.push({
|
||||
name: 'certificatefile',
|
||||
file: this.ruleFormData.userInfo.gradeCertificate[0],
|
||||
uri: this.ruleFormData.userInfo.gradeCertificate[0].url
|
||||
})
|
||||
}
|
||||
if (this.ruleFormData.userInfo.writeSign) {
|
||||
files.push({
|
||||
name: 'signfile',
|
||||
uri: this.ruleFormData.userInfo.writeSign
|
||||
})
|
||||
}
|
||||
// const certificatefileLists = this.ruleFormData.userInfo.gradeCertificate.map(so => so.url); // 接入组合多个证书的上传, 返回数组
|
||||
const params = { ...this.ruleFormData.userInfo }
|
||||
delete params.gradeCertificate
|
||||
delete params.writeSign
|
||||
await joinClass({
|
||||
files,
|
||||
formData: { ...params, classId,USER_ID:this.$store.getters.getUserInfo.USER_ID }
|
||||
})
|
||||
.then(() => {
|
||||
uni.$u.toast('保存成功')
|
||||
setTimeout(() => {
|
||||
uni.$u.route({
|
||||
url: '/pages/train_management/face_authentication',
|
||||
params: { ...this.routeQuery, type: 'scan_face' }
|
||||
})
|
||||
}, 1500)
|
||||
})
|
||||
.catch((err) => {
|
||||
if (err) uni.$u.toast(err.msg)
|
||||
})
|
||||
})
|
||||
.catch((e) => {
|
||||
uni.$u.toast('请补全必填项')
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.content {
|
||||
.top-title {
|
||||
padding: 20rpx;
|
||||
text-align: center;
|
||||
font-size: 54rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.content_body {
|
||||
padding: 20rpx 30rpx;
|
||||
|
||||
.radio-group__style {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 60rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,140 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<u-cell-group>
|
||||
<u-cell title="头像">
|
||||
<template #value>
|
||||
<u-image width="200rpx" height="200rpx" model="widthFix" :src="$filePath + signInfo.useravatarurl" />
|
||||
</template>
|
||||
</u-cell>
|
||||
<u-cell title="姓名" :value="signInfo.name"></u-cell>
|
||||
<u-cell title="班级名称" :value="signInfo.className"></u-cell>
|
||||
<u-cell title="签到时间" :value="signInfo.studyStartTime"></u-cell>
|
||||
<u-cell title="培训地点" :value="signInfo.trainingLocationName"></u-cell>
|
||||
<u-cell title="签到状态" :value="studyStateMap[signInfo.studystate].value"></u-cell>
|
||||
<u-cell title="考试签到" :value="stageexamStateMap[signInfo.stageexamstate].value"></u-cell>
|
||||
</u-cell-group>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getSignInfo } from '@/api'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
routeQuery: {},
|
||||
signInfo: {},
|
||||
// 签到状态枚举
|
||||
studyStateMap: {
|
||||
'0': {
|
||||
value: '未签到',
|
||||
color: 'tag__red'
|
||||
},
|
||||
'3': {
|
||||
value: '已签到',
|
||||
color: 'tag__green'
|
||||
}
|
||||
},
|
||||
// 考试状态枚举
|
||||
stageexamStateMap: {
|
||||
'0': {
|
||||
value: '无需考试',
|
||||
color: 'tag__orange'
|
||||
},
|
||||
'1': {
|
||||
value: '未签到',
|
||||
color: 'tag__red'
|
||||
},
|
||||
'5': {
|
||||
value: '已签到',
|
||||
color: 'tag__green'
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(query) {
|
||||
this.routeQuery = query
|
||||
this.getData()
|
||||
},
|
||||
|
||||
methods: {
|
||||
async getData() {
|
||||
const { classId } = this.routeQuery
|
||||
let resData = await getSignInfo({
|
||||
showCount: 1,
|
||||
currentPage: 1,
|
||||
classId
|
||||
});
|
||||
this.signInfo = resData.page.list[0]
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.sign_item {
|
||||
display: flex;
|
||||
gap: 20rpx;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
|
||||
.sign_item_avatar {
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.info_body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8rpx;
|
||||
|
||||
.info_name {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.info_raw {
|
||||
color: #acafb3;
|
||||
font-size: 30rpx;
|
||||
|
||||
.content_label {
|
||||
display: inline-block;
|
||||
width: 160rpx;
|
||||
}
|
||||
|
||||
.content_value {
|
||||
display: inline-block;
|
||||
vertical-align: bottom;
|
||||
padding: 0;
|
||||
width: 300rpx;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
.tag {
|
||||
padding: 2rpx 6rpx;
|
||||
border-radius: 8rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.tag__orange {
|
||||
background: #ff9e43;
|
||||
}
|
||||
|
||||
.tag__green {
|
||||
background: #5ac725;
|
||||
}
|
||||
|
||||
.tag__red {
|
||||
background: red;
|
||||
}
|
||||
|
||||
.flex_layout {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,18 @@
|
|||
@font-face {
|
||||
font-family: "iconfont";
|
||||
src: url('https://at.alicdn.com/t/c/font_4238193_xhjudlpv4z.woff2?t=1739431188152') format('woff2'),
|
||||
url('https://at.alicdn.com/t/c/font_4238193_xhjudlpv4z.woff?t=1739431188152') format('woff'),
|
||||
url('https://at.alicdn.com/t/c/font_4238193_xhjudlpv4z.ttf?t=1739431188152') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-timer:before {
|
||||
content: "\ed63";
|
||||
}
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 5.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 6.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 78 KiB |
|
@ -5,6 +5,8 @@ import createPersistedState from 'vuex-persistedstate'
|
|||
Vue.use(Vuex)
|
||||
const store = new Vuex.Store({
|
||||
state: {
|
||||
/** 人脸检测验证状态 ["0": 未完成人脸认证; "1": 已完成人脸认证] */
|
||||
verification: "0",
|
||||
userInfo: {
|
||||
CORPINFO_ID: '',
|
||||
DEPARTMENT_ID: '',
|
||||
|
@ -20,16 +22,23 @@ const store = new Vuex.Store({
|
|||
},
|
||||
getters: {
|
||||
getUserInfo: state => state.userInfo,
|
||||
getVerification: state => state.verification,
|
||||
},
|
||||
mutations: {
|
||||
setUserInfo(state, userInfo) {
|
||||
state.userInfo = userInfo
|
||||
}
|
||||
},
|
||||
setVerification(state, verification) {
|
||||
state.verification = verification
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
setUserInfo({commit}, userInfo) {
|
||||
commit('setUserInfo', userInfo)
|
||||
}
|
||||
},
|
||||
setVerification({commit}, verification) {
|
||||
commit('setVerification', verification)
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
createPersistedState({
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
## 2.0.10(2024-06-07)
|
||||
- 优化 uni-app x 中,size 属性的类型
|
||||
## 2.0.9(2024-01-12)
|
||||
fix: 修复图标大小默认值错误的问题
|
||||
## 2.0.8(2023-12-14)
|
||||
- 修复 项目未使用 ts 情况下,打包报错的bug
|
||||
## 2.0.7(2023-12-14)
|
||||
- 修复 size 属性为 string 时,不加单位导致尺寸异常的bug
|
||||
## 2.0.6(2023-12-11)
|
||||
- 优化 兼容老版本icon类型,如 top ,bottom 等
|
||||
## 2.0.5(2023-12-11)
|
||||
- 优化 兼容老版本icon类型,如 top ,bottom 等
|
||||
## 2.0.4(2023-12-06)
|
||||
- 优化 uni-app x 下示例项目图标排序
|
||||
## 2.0.3(2023-12-06)
|
||||
- 修复 nvue下引入组件报错的bug
|
||||
## 2.0.2(2023-12-05)
|
||||
-优化 size 属性支持单位
|
||||
## 2.0.1(2023-12-05)
|
||||
- 新增 uni-app x 支持定义图标
|
||||
## 1.3.5(2022-01-24)
|
||||
- 优化 size 属性可以传入不带单位的字符串数值
|
||||
## 1.3.4(2022-01-24)
|
||||
- 优化 size 支持其他单位
|
||||
## 1.3.3(2022-01-17)
|
||||
- 修复 nvue 有些图标不显示的bug,兼容老版本图标
|
||||
## 1.3.2(2021-12-01)
|
||||
- 优化 示例可复制图标名称
|
||||
## 1.3.1(2021-11-23)
|
||||
- 优化 兼容旧组件 type 值
|
||||
## 1.3.0(2021-11-19)
|
||||
- 新增 更多图标
|
||||
- 优化 自定义图标使用方式
|
||||
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
|
||||
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-icons](https://uniapp.dcloud.io/component/uniui/uni-icons)
|
||||
## 1.1.7(2021-11-08)
|
||||
## 1.2.0(2021-07-30)
|
||||
- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
|
||||
## 1.1.5(2021-05-12)
|
||||
- 新增 组件示例地址
|
||||
## 1.1.4(2021-02-05)
|
||||
- 调整为uni_modules目录规范
|
|
@ -0,0 +1,91 @@
|
|||
<template>
|
||||
<text class="uni-icons" :style="styleObj">
|
||||
<slot>{{unicode}}</slot>
|
||||
</text>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { fontData, IconsDataItem } from './uniicons_file'
|
||||
|
||||
/**
|
||||
* Icons 图标
|
||||
* @description 用于展示 icon 图标
|
||||
* @tutorial https://ext.dcloud.net.cn/plugin?id=28
|
||||
* @property {Number,String} size 图标大小
|
||||
* @property {String} type 图标图案,参考示例
|
||||
* @property {String} color 图标颜色
|
||||
* @property {String} customPrefix 自定义图标
|
||||
* @event {Function} click 点击 Icon 触发事件
|
||||
*/
|
||||
export default {
|
||||
name: "uni-icons",
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
default: '#333333'
|
||||
},
|
||||
size: {
|
||||
type: [Number, String],
|
||||
default: 16
|
||||
},
|
||||
fontFamily: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
computed: {
|
||||
unicode() : string {
|
||||
let codes = fontData.find((item : IconsDataItem) : boolean => { return item.font_class == this.type })
|
||||
if (codes !== null) {
|
||||
return codes.unicode
|
||||
}
|
||||
return ''
|
||||
},
|
||||
iconSize() : string {
|
||||
const size = this.size
|
||||
if (typeof size == 'string') {
|
||||
const reg = /^[0-9]*$/g
|
||||
return reg.test(size as string) ? '' + size + 'px' : '' + size;
|
||||
// return '' + this.size
|
||||
}
|
||||
return this.getFontSize(size as number)
|
||||
},
|
||||
styleObj() : UTSJSONObject {
|
||||
if (this.fontFamily !== '') {
|
||||
return { color: this.color, fontSize: this.iconSize, fontFamily: this.fontFamily }
|
||||
}
|
||||
return { color: this.color, fontSize: this.iconSize }
|
||||
}
|
||||
},
|
||||
created() { },
|
||||
methods: {
|
||||
/**
|
||||
* 字体大小
|
||||
*/
|
||||
getFontSize(size : number) : string {
|
||||
return size + 'px';
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@font-face {
|
||||
font-family: UniIconsFontFamily;
|
||||
src: url('./uniicons.ttf');
|
||||
}
|
||||
|
||||
.uni-icons {
|
||||
font-family: UniIconsFontFamily;
|
||||
font-size: 18px;
|
||||
font-style: normal;
|
||||
color: #333;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,110 @@
|
|||
<template>
|
||||
<!-- #ifdef APP-NVUE -->
|
||||
<text :style="styleObj" class="uni-icons" @click="_onClick">{{unicode}}</text>
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef APP-NVUE -->
|
||||
<text :style="styleObj" class="uni-icons" :class="['uniui-'+type,customPrefix,customPrefix?type:'']" @click="_onClick">
|
||||
<slot></slot>
|
||||
</text>
|
||||
<!-- #endif -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { fontData } from './uniicons_file_vue.js';
|
||||
|
||||
const getVal = (val) => {
|
||||
const reg = /^[0-9]*$/g
|
||||
return (typeof val === 'number' || reg.test(val)) ? val + 'px' : val;
|
||||
}
|
||||
|
||||
// #ifdef APP-NVUE
|
||||
var domModule = weex.requireModule('dom');
|
||||
import iconUrl from './uniicons.ttf'
|
||||
domModule.addRule('fontFace', {
|
||||
'fontFamily': "uniicons",
|
||||
'src': "url('" + iconUrl + "')"
|
||||
});
|
||||
// #endif
|
||||
|
||||
/**
|
||||
* Icons 图标
|
||||
* @description 用于展示 icons 图标
|
||||
* @tutorial https://ext.dcloud.net.cn/plugin?id=28
|
||||
* @property {Number} size 图标大小
|
||||
* @property {String} type 图标图案,参考示例
|
||||
* @property {String} color 图标颜色
|
||||
* @property {String} customPrefix 自定义图标
|
||||
* @event {Function} click 点击 Icon 触发事件
|
||||
*/
|
||||
export default {
|
||||
name: 'UniIcons',
|
||||
emits: ['click'],
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
default: '#333333'
|
||||
},
|
||||
size: {
|
||||
type: [Number, String],
|
||||
default: 16
|
||||
},
|
||||
customPrefix: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
fontFamily: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
icons: fontData
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
unicode() {
|
||||
let code = this.icons.find(v => v.font_class === this.type)
|
||||
if (code) {
|
||||
return code.unicode
|
||||
}
|
||||
return ''
|
||||
},
|
||||
iconSize() {
|
||||
return getVal(this.size)
|
||||
},
|
||||
styleObj() {
|
||||
if (this.fontFamily !== '') {
|
||||
return `color: ${this.color}; font-size: ${this.iconSize}; font-family: ${this.fontFamily};`
|
||||
}
|
||||
return `color: ${this.color}; font-size: ${this.iconSize};`
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
_onClick() {
|
||||
this.$emit('click')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/* #ifndef APP-NVUE */
|
||||
@import './uniicons.css';
|
||||
|
||||
@font-face {
|
||||
font-family: uniicons;
|
||||
src: url('./uniicons.ttf');
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
.uni-icons {
|
||||
font-family: uniicons;
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,664 @@
|
|||
|
||||
.uniui-cart-filled:before {
|
||||
content: "\e6d0";
|
||||
}
|
||||
|
||||
.uniui-gift-filled:before {
|
||||
content: "\e6c4";
|
||||
}
|
||||
|
||||
.uniui-color:before {
|
||||
content: "\e6cf";
|
||||
}
|
||||
|
||||
.uniui-wallet:before {
|
||||
content: "\e6b1";
|
||||
}
|
||||
|
||||
.uniui-settings-filled:before {
|
||||
content: "\e6ce";
|
||||
}
|
||||
|
||||
.uniui-auth-filled:before {
|
||||
content: "\e6cc";
|
||||
}
|
||||
|
||||
.uniui-shop-filled:before {
|
||||
content: "\e6cd";
|
||||
}
|
||||
|
||||
.uniui-staff-filled:before {
|
||||
content: "\e6cb";
|
||||
}
|
||||
|
||||
.uniui-vip-filled:before {
|
||||
content: "\e6c6";
|
||||
}
|
||||
|
||||
.uniui-plus-filled:before {
|
||||
content: "\e6c7";
|
||||
}
|
||||
|
||||
.uniui-folder-add-filled:before {
|
||||
content: "\e6c8";
|
||||
}
|
||||
|
||||
.uniui-color-filled:before {
|
||||
content: "\e6c9";
|
||||
}
|
||||
|
||||
.uniui-tune-filled:before {
|
||||
content: "\e6ca";
|
||||
}
|
||||
|
||||
.uniui-calendar-filled:before {
|
||||
content: "\e6c0";
|
||||
}
|
||||
|
||||
.uniui-notification-filled:before {
|
||||
content: "\e6c1";
|
||||
}
|
||||
|
||||
.uniui-wallet-filled:before {
|
||||
content: "\e6c2";
|
||||
}
|
||||
|
||||
.uniui-medal-filled:before {
|
||||
content: "\e6c3";
|
||||
}
|
||||
|
||||
.uniui-fire-filled:before {
|
||||
content: "\e6c5";
|
||||
}
|
||||
|
||||
.uniui-refreshempty:before {
|
||||
content: "\e6bf";
|
||||
}
|
||||
|
||||
.uniui-location-filled:before {
|
||||
content: "\e6af";
|
||||
}
|
||||
|
||||
.uniui-person-filled:before {
|
||||
content: "\e69d";
|
||||
}
|
||||
|
||||
.uniui-personadd-filled:before {
|
||||
content: "\e698";
|
||||
}
|
||||
|
||||
.uniui-arrowthinleft:before {
|
||||
content: "\e6d2";
|
||||
}
|
||||
|
||||
.uniui-arrowthinup:before {
|
||||
content: "\e6d3";
|
||||
}
|
||||
|
||||
.uniui-arrowthindown:before {
|
||||
content: "\e6d4";
|
||||
}
|
||||
|
||||
.uniui-back:before {
|
||||
content: "\e6b9";
|
||||
}
|
||||
|
||||
.uniui-forward:before {
|
||||
content: "\e6ba";
|
||||
}
|
||||
|
||||
.uniui-arrow-right:before {
|
||||
content: "\e6bb";
|
||||
}
|
||||
|
||||
.uniui-arrow-left:before {
|
||||
content: "\e6bc";
|
||||
}
|
||||
|
||||
.uniui-arrow-up:before {
|
||||
content: "\e6bd";
|
||||
}
|
||||
|
||||
.uniui-arrow-down:before {
|
||||
content: "\e6be";
|
||||
}
|
||||
|
||||
.uniui-arrowthinright:before {
|
||||
content: "\e6d1";
|
||||
}
|
||||
|
||||
.uniui-down:before {
|
||||
content: "\e6b8";
|
||||
}
|
||||
|
||||
.uniui-bottom:before {
|
||||
content: "\e6b8";
|
||||
}
|
||||
|
||||
.uniui-arrowright:before {
|
||||
content: "\e6d5";
|
||||
}
|
||||
|
||||
.uniui-right:before {
|
||||
content: "\e6b5";
|
||||
}
|
||||
|
||||
.uniui-up:before {
|
||||
content: "\e6b6";
|
||||
}
|
||||
|
||||
.uniui-top:before {
|
||||
content: "\e6b6";
|
||||
}
|
||||
|
||||
.uniui-left:before {
|
||||
content: "\e6b7";
|
||||
}
|
||||
|
||||
.uniui-arrowup:before {
|
||||
content: "\e6d6";
|
||||
}
|
||||
|
||||
.uniui-eye:before {
|
||||
content: "\e651";
|
||||
}
|
||||
|
||||
.uniui-eye-filled:before {
|
||||
content: "\e66a";
|
||||
}
|
||||
|
||||
.uniui-eye-slash:before {
|
||||
content: "\e6b3";
|
||||
}
|
||||
|
||||
.uniui-eye-slash-filled:before {
|
||||
content: "\e6b4";
|
||||
}
|
||||
|
||||
.uniui-info-filled:before {
|
||||
content: "\e649";
|
||||
}
|
||||
|
||||
.uniui-reload:before {
|
||||
content: "\e6b2";
|
||||
}
|
||||
|
||||
.uniui-micoff-filled:before {
|
||||
content: "\e6b0";
|
||||
}
|
||||
|
||||
.uniui-map-pin-ellipse:before {
|
||||
content: "\e6ac";
|
||||
}
|
||||
|
||||
.uniui-map-pin:before {
|
||||
content: "\e6ad";
|
||||
}
|
||||
|
||||
.uniui-location:before {
|
||||
content: "\e6ae";
|
||||
}
|
||||
|
||||
.uniui-starhalf:before {
|
||||
content: "\e683";
|
||||
}
|
||||
|
||||
.uniui-star:before {
|
||||
content: "\e688";
|
||||
}
|
||||
|
||||
.uniui-star-filled:before {
|
||||
content: "\e68f";
|
||||
}
|
||||
|
||||
.uniui-calendar:before {
|
||||
content: "\e6a0";
|
||||
}
|
||||
|
||||
.uniui-fire:before {
|
||||
content: "\e6a1";
|
||||
}
|
||||
|
||||
.uniui-medal:before {
|
||||
content: "\e6a2";
|
||||
}
|
||||
|
||||
.uniui-font:before {
|
||||
content: "\e6a3";
|
||||
}
|
||||
|
||||
.uniui-gift:before {
|
||||
content: "\e6a4";
|
||||
}
|
||||
|
||||
.uniui-link:before {
|
||||
content: "\e6a5";
|
||||
}
|
||||
|
||||
.uniui-notification:before {
|
||||
content: "\e6a6";
|
||||
}
|
||||
|
||||
.uniui-staff:before {
|
||||
content: "\e6a7";
|
||||
}
|
||||
|
||||
.uniui-vip:before {
|
||||
content: "\e6a8";
|
||||
}
|
||||
|
||||
.uniui-folder-add:before {
|
||||
content: "\e6a9";
|
||||
}
|
||||
|
||||
.uniui-tune:before {
|
||||
content: "\e6aa";
|
||||
}
|
||||
|
||||
.uniui-auth:before {
|
||||
content: "\e6ab";
|
||||
}
|
||||
|
||||
.uniui-person:before {
|
||||
content: "\e699";
|
||||
}
|
||||
|
||||
.uniui-email-filled:before {
|
||||
content: "\e69a";
|
||||
}
|
||||
|
||||
.uniui-phone-filled:before {
|
||||
content: "\e69b";
|
||||
}
|
||||
|
||||
.uniui-phone:before {
|
||||
content: "\e69c";
|
||||
}
|
||||
|
||||
.uniui-email:before {
|
||||
content: "\e69e";
|
||||
}
|
||||
|
||||
.uniui-personadd:before {
|
||||
content: "\e69f";
|
||||
}
|
||||
|
||||
.uniui-chatboxes-filled:before {
|
||||
content: "\e692";
|
||||
}
|
||||
|
||||
.uniui-contact:before {
|
||||
content: "\e693";
|
||||
}
|
||||
|
||||
.uniui-chatbubble-filled:before {
|
||||
content: "\e694";
|
||||
}
|
||||
|
||||
.uniui-contact-filled:before {
|
||||
content: "\e695";
|
||||
}
|
||||
|
||||
.uniui-chatboxes:before {
|
||||
content: "\e696";
|
||||
}
|
||||
|
||||
.uniui-chatbubble:before {
|
||||
content: "\e697";
|
||||
}
|
||||
|
||||
.uniui-upload-filled:before {
|
||||
content: "\e68e";
|
||||
}
|
||||
|
||||
.uniui-upload:before {
|
||||
content: "\e690";
|
||||
}
|
||||
|
||||
.uniui-weixin:before {
|
||||
content: "\e691";
|
||||
}
|
||||
|
||||
.uniui-compose:before {
|
||||
content: "\e67f";
|
||||
}
|
||||
|
||||
.uniui-qq:before {
|
||||
content: "\e680";
|
||||
}
|
||||
|
||||
.uniui-download-filled:before {
|
||||
content: "\e681";
|
||||
}
|
||||
|
||||
.uniui-pyq:before {
|
||||
content: "\e682";
|
||||
}
|
||||
|
||||
.uniui-sound:before {
|
||||
content: "\e684";
|
||||
}
|
||||
|
||||
.uniui-trash-filled:before {
|
||||
content: "\e685";
|
||||
}
|
||||
|
||||
.uniui-sound-filled:before {
|
||||
content: "\e686";
|
||||
}
|
||||
|
||||
.uniui-trash:before {
|
||||
content: "\e687";
|
||||
}
|
||||
|
||||
.uniui-videocam-filled:before {
|
||||
content: "\e689";
|
||||
}
|
||||
|
||||
.uniui-spinner-cycle:before {
|
||||
content: "\e68a";
|
||||
}
|
||||
|
||||
.uniui-weibo:before {
|
||||
content: "\e68b";
|
||||
}
|
||||
|
||||
.uniui-videocam:before {
|
||||
content: "\e68c";
|
||||
}
|
||||
|
||||
.uniui-download:before {
|
||||
content: "\e68d";
|
||||
}
|
||||
|
||||
.uniui-help:before {
|
||||
content: "\e679";
|
||||
}
|
||||
|
||||
.uniui-navigate-filled:before {
|
||||
content: "\e67a";
|
||||
}
|
||||
|
||||
.uniui-plusempty:before {
|
||||
content: "\e67b";
|
||||
}
|
||||
|
||||
.uniui-smallcircle:before {
|
||||
content: "\e67c";
|
||||
}
|
||||
|
||||
.uniui-minus-filled:before {
|
||||
content: "\e67d";
|
||||
}
|
||||
|
||||
.uniui-micoff:before {
|
||||
content: "\e67e";
|
||||
}
|
||||
|
||||
.uniui-closeempty:before {
|
||||
content: "\e66c";
|
||||
}
|
||||
|
||||
.uniui-clear:before {
|
||||
content: "\e66d";
|
||||
}
|
||||
|
||||
.uniui-navigate:before {
|
||||
content: "\e66e";
|
||||
}
|
||||
|
||||
.uniui-minus:before {
|
||||
content: "\e66f";
|
||||
}
|
||||
|
||||
.uniui-image:before {
|
||||
content: "\e670";
|
||||
}
|
||||
|
||||
.uniui-mic:before {
|
||||
content: "\e671";
|
||||
}
|
||||
|
||||
.uniui-paperplane:before {
|
||||
content: "\e672";
|
||||
}
|
||||
|
||||
.uniui-close:before {
|
||||
content: "\e673";
|
||||
}
|
||||
|
||||
.uniui-help-filled:before {
|
||||
content: "\e674";
|
||||
}
|
||||
|
||||
.uniui-paperplane-filled:before {
|
||||
content: "\e675";
|
||||
}
|
||||
|
||||
.uniui-plus:before {
|
||||
content: "\e676";
|
||||
}
|
||||
|
||||
.uniui-mic-filled:before {
|
||||
content: "\e677";
|
||||
}
|
||||
|
||||
.uniui-image-filled:before {
|
||||
content: "\e678";
|
||||
}
|
||||
|
||||
.uniui-locked-filled:before {
|
||||
content: "\e668";
|
||||
}
|
||||
|
||||
.uniui-info:before {
|
||||
content: "\e669";
|
||||
}
|
||||
|
||||
.uniui-locked:before {
|
||||
content: "\e66b";
|
||||
}
|
||||
|
||||
.uniui-camera-filled:before {
|
||||
content: "\e658";
|
||||
}
|
||||
|
||||
.uniui-chat-filled:before {
|
||||
content: "\e659";
|
||||
}
|
||||
|
||||
.uniui-camera:before {
|
||||
content: "\e65a";
|
||||
}
|
||||
|
||||
.uniui-circle:before {
|
||||
content: "\e65b";
|
||||
}
|
||||
|
||||
.uniui-checkmarkempty:before {
|
||||
content: "\e65c";
|
||||
}
|
||||
|
||||
.uniui-chat:before {
|
||||
content: "\e65d";
|
||||
}
|
||||
|
||||
.uniui-circle-filled:before {
|
||||
content: "\e65e";
|
||||
}
|
||||
|
||||
.uniui-flag:before {
|
||||
content: "\e65f";
|
||||
}
|
||||
|
||||
.uniui-flag-filled:before {
|
||||
content: "\e660";
|
||||
}
|
||||
|
||||
.uniui-gear-filled:before {
|
||||
content: "\e661";
|
||||
}
|
||||
|
||||
.uniui-home:before {
|
||||
content: "\e662";
|
||||
}
|
||||
|
||||
.uniui-home-filled:before {
|
||||
content: "\e663";
|
||||
}
|
||||
|
||||
.uniui-gear:before {
|
||||
content: "\e664";
|
||||
}
|
||||
|
||||
.uniui-smallcircle-filled:before {
|
||||
content: "\e665";
|
||||
}
|
||||
|
||||
.uniui-map-filled:before {
|
||||
content: "\e666";
|
||||
}
|
||||
|
||||
.uniui-map:before {
|
||||
content: "\e667";
|
||||
}
|
||||
|
||||
.uniui-refresh-filled:before {
|
||||
content: "\e656";
|
||||
}
|
||||
|
||||
.uniui-refresh:before {
|
||||
content: "\e657";
|
||||
}
|
||||
|
||||
.uniui-cloud-upload:before {
|
||||
content: "\e645";
|
||||
}
|
||||
|
||||
.uniui-cloud-download-filled:before {
|
||||
content: "\e646";
|
||||
}
|
||||
|
||||
.uniui-cloud-download:before {
|
||||
content: "\e647";
|
||||
}
|
||||
|
||||
.uniui-cloud-upload-filled:before {
|
||||
content: "\e648";
|
||||
}
|
||||
|
||||
.uniui-redo:before {
|
||||
content: "\e64a";
|
||||
}
|
||||
|
||||
.uniui-images-filled:before {
|
||||
content: "\e64b";
|
||||
}
|
||||
|
||||
.uniui-undo-filled:before {
|
||||
content: "\e64c";
|
||||
}
|
||||
|
||||
.uniui-more:before {
|
||||
content: "\e64d";
|
||||
}
|
||||
|
||||
.uniui-more-filled:before {
|
||||
content: "\e64e";
|
||||
}
|
||||
|
||||
.uniui-undo:before {
|
||||
content: "\e64f";
|
||||
}
|
||||
|
||||
.uniui-images:before {
|
||||
content: "\e650";
|
||||
}
|
||||
|
||||
.uniui-paperclip:before {
|
||||
content: "\e652";
|
||||
}
|
||||
|
||||
.uniui-settings:before {
|
||||
content: "\e653";
|
||||
}
|
||||
|
||||
.uniui-search:before {
|
||||
content: "\e654";
|
||||
}
|
||||
|
||||
.uniui-redo-filled:before {
|
||||
content: "\e655";
|
||||
}
|
||||
|
||||
.uniui-list:before {
|
||||
content: "\e644";
|
||||
}
|
||||
|
||||
.uniui-mail-open-filled:before {
|
||||
content: "\e63a";
|
||||
}
|
||||
|
||||
.uniui-hand-down-filled:before {
|
||||
content: "\e63c";
|
||||
}
|
||||
|
||||
.uniui-hand-down:before {
|
||||
content: "\e63d";
|
||||
}
|
||||
|
||||
.uniui-hand-up-filled:before {
|
||||
content: "\e63e";
|
||||
}
|
||||
|
||||
.uniui-hand-up:before {
|
||||
content: "\e63f";
|
||||
}
|
||||
|
||||
.uniui-heart-filled:before {
|
||||
content: "\e641";
|
||||
}
|
||||
|
||||
.uniui-mail-open:before {
|
||||
content: "\e643";
|
||||
}
|
||||
|
||||
.uniui-heart:before {
|
||||
content: "\e639";
|
||||
}
|
||||
|
||||
.uniui-loop:before {
|
||||
content: "\e633";
|
||||
}
|
||||
|
||||
.uniui-pulldown:before {
|
||||
content: "\e632";
|
||||
}
|
||||
|
||||
.uniui-scan:before {
|
||||
content: "\e62a";
|
||||
}
|
||||
|
||||
.uniui-bars:before {
|
||||
content: "\e627";
|
||||
}
|
||||
|
||||
.uniui-checkbox:before {
|
||||
content: "\e62b";
|
||||
}
|
||||
|
||||
.uniui-checkbox-filled:before {
|
||||
content: "\e62c";
|
||||
}
|
||||
|
||||
.uniui-shop:before {
|
||||
content: "\e62f";
|
||||
}
|
||||
|
||||
.uniui-headphones:before {
|
||||
content: "\e630";
|
||||
}
|
||||
|
||||
.uniui-cart:before {
|
||||
content: "\e631";
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,664 @@
|
|||
|
||||
export type IconsData = {
|
||||
id : string
|
||||
name : string
|
||||
font_family : string
|
||||
css_prefix_text : string
|
||||
description : string
|
||||
glyphs : Array<IconsDataItem>
|
||||
}
|
||||
|
||||
export type IconsDataItem = {
|
||||
font_class : string
|
||||
unicode : string
|
||||
}
|
||||
|
||||
|
||||
export const fontData = [
|
||||
{
|
||||
"font_class": "arrow-down",
|
||||
"unicode": "\ue6be"
|
||||
},
|
||||
{
|
||||
"font_class": "arrow-left",
|
||||
"unicode": "\ue6bc"
|
||||
},
|
||||
{
|
||||
"font_class": "arrow-right",
|
||||
"unicode": "\ue6bb"
|
||||
},
|
||||
{
|
||||
"font_class": "arrow-up",
|
||||
"unicode": "\ue6bd"
|
||||
},
|
||||
{
|
||||
"font_class": "auth",
|
||||
"unicode": "\ue6ab"
|
||||
},
|
||||
{
|
||||
"font_class": "auth-filled",
|
||||
"unicode": "\ue6cc"
|
||||
},
|
||||
{
|
||||
"font_class": "back",
|
||||
"unicode": "\ue6b9"
|
||||
},
|
||||
{
|
||||
"font_class": "bars",
|
||||
"unicode": "\ue627"
|
||||
},
|
||||
{
|
||||
"font_class": "calendar",
|
||||
"unicode": "\ue6a0"
|
||||
},
|
||||
{
|
||||
"font_class": "calendar-filled",
|
||||
"unicode": "\ue6c0"
|
||||
},
|
||||
{
|
||||
"font_class": "camera",
|
||||
"unicode": "\ue65a"
|
||||
},
|
||||
{
|
||||
"font_class": "camera-filled",
|
||||
"unicode": "\ue658"
|
||||
},
|
||||
{
|
||||
"font_class": "cart",
|
||||
"unicode": "\ue631"
|
||||
},
|
||||
{
|
||||
"font_class": "cart-filled",
|
||||
"unicode": "\ue6d0"
|
||||
},
|
||||
{
|
||||
"font_class": "chat",
|
||||
"unicode": "\ue65d"
|
||||
},
|
||||
{
|
||||
"font_class": "chat-filled",
|
||||
"unicode": "\ue659"
|
||||
},
|
||||
{
|
||||
"font_class": "chatboxes",
|
||||
"unicode": "\ue696"
|
||||
},
|
||||
{
|
||||
"font_class": "chatboxes-filled",
|
||||
"unicode": "\ue692"
|
||||
},
|
||||
{
|
||||
"font_class": "chatbubble",
|
||||
"unicode": "\ue697"
|
||||
},
|
||||
{
|
||||
"font_class": "chatbubble-filled",
|
||||
"unicode": "\ue694"
|
||||
},
|
||||
{
|
||||
"font_class": "checkbox",
|
||||
"unicode": "\ue62b"
|
||||
},
|
||||
{
|
||||
"font_class": "checkbox-filled",
|
||||
"unicode": "\ue62c"
|
||||
},
|
||||
{
|
||||
"font_class": "checkmarkempty",
|
||||
"unicode": "\ue65c"
|
||||
},
|
||||
{
|
||||
"font_class": "circle",
|
||||
"unicode": "\ue65b"
|
||||
},
|
||||
{
|
||||
"font_class": "circle-filled",
|
||||
"unicode": "\ue65e"
|
||||
},
|
||||
{
|
||||
"font_class": "clear",
|
||||
"unicode": "\ue66d"
|
||||
},
|
||||
{
|
||||
"font_class": "close",
|
||||
"unicode": "\ue673"
|
||||
},
|
||||
{
|
||||
"font_class": "closeempty",
|
||||
"unicode": "\ue66c"
|
||||
},
|
||||
{
|
||||
"font_class": "cloud-download",
|
||||
"unicode": "\ue647"
|
||||
},
|
||||
{
|
||||
"font_class": "cloud-download-filled",
|
||||
"unicode": "\ue646"
|
||||
},
|
||||
{
|
||||
"font_class": "cloud-upload",
|
||||
"unicode": "\ue645"
|
||||
},
|
||||
{
|
||||
"font_class": "cloud-upload-filled",
|
||||
"unicode": "\ue648"
|
||||
},
|
||||
{
|
||||
"font_class": "color",
|
||||
"unicode": "\ue6cf"
|
||||
},
|
||||
{
|
||||
"font_class": "color-filled",
|
||||
"unicode": "\ue6c9"
|
||||
},
|
||||
{
|
||||
"font_class": "compose",
|
||||
"unicode": "\ue67f"
|
||||
},
|
||||
{
|
||||
"font_class": "contact",
|
||||
"unicode": "\ue693"
|
||||
},
|
||||
{
|
||||
"font_class": "contact-filled",
|
||||
"unicode": "\ue695"
|
||||
},
|
||||
{
|
||||
"font_class": "down",
|
||||
"unicode": "\ue6b8"
|
||||
},
|
||||
{
|
||||
"font_class": "bottom",
|
||||
"unicode": "\ue6b8"
|
||||
},
|
||||
{
|
||||
"font_class": "download",
|
||||
"unicode": "\ue68d"
|
||||
},
|
||||
{
|
||||
"font_class": "download-filled",
|
||||
"unicode": "\ue681"
|
||||
},
|
||||
{
|
||||
"font_class": "email",
|
||||
"unicode": "\ue69e"
|
||||
},
|
||||
{
|
||||
"font_class": "email-filled",
|
||||
"unicode": "\ue69a"
|
||||
},
|
||||
{
|
||||
"font_class": "eye",
|
||||
"unicode": "\ue651"
|
||||
},
|
||||
{
|
||||
"font_class": "eye-filled",
|
||||
"unicode": "\ue66a"
|
||||
},
|
||||
{
|
||||
"font_class": "eye-slash",
|
||||
"unicode": "\ue6b3"
|
||||
},
|
||||
{
|
||||
"font_class": "eye-slash-filled",
|
||||
"unicode": "\ue6b4"
|
||||
},
|
||||
{
|
||||
"font_class": "fire",
|
||||
"unicode": "\ue6a1"
|
||||
},
|
||||
{
|
||||
"font_class": "fire-filled",
|
||||
"unicode": "\ue6c5"
|
||||
},
|
||||
{
|
||||
"font_class": "flag",
|
||||
"unicode": "\ue65f"
|
||||
},
|
||||
{
|
||||
"font_class": "flag-filled",
|
||||
"unicode": "\ue660"
|
||||
},
|
||||
{
|
||||
"font_class": "folder-add",
|
||||
"unicode": "\ue6a9"
|
||||
},
|
||||
{
|
||||
"font_class": "folder-add-filled",
|
||||
"unicode": "\ue6c8"
|
||||
},
|
||||
{
|
||||
"font_class": "font",
|
||||
"unicode": "\ue6a3"
|
||||
},
|
||||
{
|
||||
"font_class": "forward",
|
||||
"unicode": "\ue6ba"
|
||||
},
|
||||
{
|
||||
"font_class": "gear",
|
||||
"unicode": "\ue664"
|
||||
},
|
||||
{
|
||||
"font_class": "gear-filled",
|
||||
"unicode": "\ue661"
|
||||
},
|
||||
{
|
||||
"font_class": "gift",
|
||||
"unicode": "\ue6a4"
|
||||
},
|
||||
{
|
||||
"font_class": "gift-filled",
|
||||
"unicode": "\ue6c4"
|
||||
},
|
||||
{
|
||||
"font_class": "hand-down",
|
||||
"unicode": "\ue63d"
|
||||
},
|
||||
{
|
||||
"font_class": "hand-down-filled",
|
||||
"unicode": "\ue63c"
|
||||
},
|
||||
{
|
||||
"font_class": "hand-up",
|
||||
"unicode": "\ue63f"
|
||||
},
|
||||
{
|
||||
"font_class": "hand-up-filled",
|
||||
"unicode": "\ue63e"
|
||||
},
|
||||
{
|
||||
"font_class": "headphones",
|
||||
"unicode": "\ue630"
|
||||
},
|
||||
{
|
||||
"font_class": "heart",
|
||||
"unicode": "\ue639"
|
||||
},
|
||||
{
|
||||
"font_class": "heart-filled",
|
||||
"unicode": "\ue641"
|
||||
},
|
||||
{
|
||||
"font_class": "help",
|
||||
"unicode": "\ue679"
|
||||
},
|
||||
{
|
||||
"font_class": "help-filled",
|
||||
"unicode": "\ue674"
|
||||
},
|
||||
{
|
||||
"font_class": "home",
|
||||
"unicode": "\ue662"
|
||||
},
|
||||
{
|
||||
"font_class": "home-filled",
|
||||
"unicode": "\ue663"
|
||||
},
|
||||
{
|
||||
"font_class": "image",
|
||||
"unicode": "\ue670"
|
||||
},
|
||||
{
|
||||
"font_class": "image-filled",
|
||||
"unicode": "\ue678"
|
||||
},
|
||||
{
|
||||
"font_class": "images",
|
||||
"unicode": "\ue650"
|
||||
},
|
||||
{
|
||||
"font_class": "images-filled",
|
||||
"unicode": "\ue64b"
|
||||
},
|
||||
{
|
||||
"font_class": "info",
|
||||
"unicode": "\ue669"
|
||||
},
|
||||
{
|
||||
"font_class": "info-filled",
|
||||
"unicode": "\ue649"
|
||||
},
|
||||
{
|
||||
"font_class": "left",
|
||||
"unicode": "\ue6b7"
|
||||
},
|
||||
{
|
||||
"font_class": "link",
|
||||
"unicode": "\ue6a5"
|
||||
},
|
||||
{
|
||||
"font_class": "list",
|
||||
"unicode": "\ue644"
|
||||
},
|
||||
{
|
||||
"font_class": "location",
|
||||
"unicode": "\ue6ae"
|
||||
},
|
||||
{
|
||||
"font_class": "location-filled",
|
||||
"unicode": "\ue6af"
|
||||
},
|
||||
{
|
||||
"font_class": "locked",
|
||||
"unicode": "\ue66b"
|
||||
},
|
||||
{
|
||||
"font_class": "locked-filled",
|
||||
"unicode": "\ue668"
|
||||
},
|
||||
{
|
||||
"font_class": "loop",
|
||||
"unicode": "\ue633"
|
||||
},
|
||||
{
|
||||
"font_class": "mail-open",
|
||||
"unicode": "\ue643"
|
||||
},
|
||||
{
|
||||
"font_class": "mail-open-filled",
|
||||
"unicode": "\ue63a"
|
||||
},
|
||||
{
|
||||
"font_class": "map",
|
||||
"unicode": "\ue667"
|
||||
},
|
||||
{
|
||||
"font_class": "map-filled",
|
||||
"unicode": "\ue666"
|
||||
},
|
||||
{
|
||||
"font_class": "map-pin",
|
||||
"unicode": "\ue6ad"
|
||||
},
|
||||
{
|
||||
"font_class": "map-pin-ellipse",
|
||||
"unicode": "\ue6ac"
|
||||
},
|
||||
{
|
||||
"font_class": "medal",
|
||||
"unicode": "\ue6a2"
|
||||
},
|
||||
{
|
||||
"font_class": "medal-filled",
|
||||
"unicode": "\ue6c3"
|
||||
},
|
||||
{
|
||||
"font_class": "mic",
|
||||
"unicode": "\ue671"
|
||||
},
|
||||
{
|
||||
"font_class": "mic-filled",
|
||||
"unicode": "\ue677"
|
||||
},
|
||||
{
|
||||
"font_class": "micoff",
|
||||
"unicode": "\ue67e"
|
||||
},
|
||||
{
|
||||
"font_class": "micoff-filled",
|
||||
"unicode": "\ue6b0"
|
||||
},
|
||||
{
|
||||
"font_class": "minus",
|
||||
"unicode": "\ue66f"
|
||||
},
|
||||
{
|
||||
"font_class": "minus-filled",
|
||||
"unicode": "\ue67d"
|
||||
},
|
||||
{
|
||||
"font_class": "more",
|
||||
"unicode": "\ue64d"
|
||||
},
|
||||
{
|
||||
"font_class": "more-filled",
|
||||
"unicode": "\ue64e"
|
||||
},
|
||||
{
|
||||
"font_class": "navigate",
|
||||
"unicode": "\ue66e"
|
||||
},
|
||||
{
|
||||
"font_class": "navigate-filled",
|
||||
"unicode": "\ue67a"
|
||||
},
|
||||
{
|
||||
"font_class": "notification",
|
||||
"unicode": "\ue6a6"
|
||||
},
|
||||
{
|
||||
"font_class": "notification-filled",
|
||||
"unicode": "\ue6c1"
|
||||
},
|
||||
{
|
||||
"font_class": "paperclip",
|
||||
"unicode": "\ue652"
|
||||
},
|
||||
{
|
||||
"font_class": "paperplane",
|
||||
"unicode": "\ue672"
|
||||
},
|
||||
{
|
||||
"font_class": "paperplane-filled",
|
||||
"unicode": "\ue675"
|
||||
},
|
||||
{
|
||||
"font_class": "person",
|
||||
"unicode": "\ue699"
|
||||
},
|
||||
{
|
||||
"font_class": "person-filled",
|
||||
"unicode": "\ue69d"
|
||||
},
|
||||
{
|
||||
"font_class": "personadd",
|
||||
"unicode": "\ue69f"
|
||||
},
|
||||
{
|
||||
"font_class": "personadd-filled",
|
||||
"unicode": "\ue698"
|
||||
},
|
||||
{
|
||||
"font_class": "personadd-filled-copy",
|
||||
"unicode": "\ue6d1"
|
||||
},
|
||||
{
|
||||
"font_class": "phone",
|
||||
"unicode": "\ue69c"
|
||||
},
|
||||
{
|
||||
"font_class": "phone-filled",
|
||||
"unicode": "\ue69b"
|
||||
},
|
||||
{
|
||||
"font_class": "plus",
|
||||
"unicode": "\ue676"
|
||||
},
|
||||
{
|
||||
"font_class": "plus-filled",
|
||||
"unicode": "\ue6c7"
|
||||
},
|
||||
{
|
||||
"font_class": "plusempty",
|
||||
"unicode": "\ue67b"
|
||||
},
|
||||
{
|
||||
"font_class": "pulldown",
|
||||
"unicode": "\ue632"
|
||||
},
|
||||
{
|
||||
"font_class": "pyq",
|
||||
"unicode": "\ue682"
|
||||
},
|
||||
{
|
||||
"font_class": "qq",
|
||||
"unicode": "\ue680"
|
||||
},
|
||||
{
|
||||
"font_class": "redo",
|
||||
"unicode": "\ue64a"
|
||||
},
|
||||
{
|
||||
"font_class": "redo-filled",
|
||||
"unicode": "\ue655"
|
||||
},
|
||||
{
|
||||
"font_class": "refresh",
|
||||
"unicode": "\ue657"
|
||||
},
|
||||
{
|
||||
"font_class": "refresh-filled",
|
||||
"unicode": "\ue656"
|
||||
},
|
||||
{
|
||||
"font_class": "refreshempty",
|
||||
"unicode": "\ue6bf"
|
||||
},
|
||||
{
|
||||
"font_class": "reload",
|
||||
"unicode": "\ue6b2"
|
||||
},
|
||||
{
|
||||
"font_class": "right",
|
||||
"unicode": "\ue6b5"
|
||||
},
|
||||
{
|
||||
"font_class": "scan",
|
||||
"unicode": "\ue62a"
|
||||
},
|
||||
{
|
||||
"font_class": "search",
|
||||
"unicode": "\ue654"
|
||||
},
|
||||
{
|
||||
"font_class": "settings",
|
||||
"unicode": "\ue653"
|
||||
},
|
||||
{
|
||||
"font_class": "settings-filled",
|
||||
"unicode": "\ue6ce"
|
||||
},
|
||||
{
|
||||
"font_class": "shop",
|
||||
"unicode": "\ue62f"
|
||||
},
|
||||
{
|
||||
"font_class": "shop-filled",
|
||||
"unicode": "\ue6cd"
|
||||
},
|
||||
{
|
||||
"font_class": "smallcircle",
|
||||
"unicode": "\ue67c"
|
||||
},
|
||||
{
|
||||
"font_class": "smallcircle-filled",
|
||||
"unicode": "\ue665"
|
||||
},
|
||||
{
|
||||
"font_class": "sound",
|
||||
"unicode": "\ue684"
|
||||
},
|
||||
{
|
||||
"font_class": "sound-filled",
|
||||
"unicode": "\ue686"
|
||||
},
|
||||
{
|
||||
"font_class": "spinner-cycle",
|
||||
"unicode": "\ue68a"
|
||||
},
|
||||
{
|
||||
"font_class": "staff",
|
||||
"unicode": "\ue6a7"
|
||||
},
|
||||
{
|
||||
"font_class": "staff-filled",
|
||||
"unicode": "\ue6cb"
|
||||
},
|
||||
{
|
||||
"font_class": "star",
|
||||
"unicode": "\ue688"
|
||||
},
|
||||
{
|
||||
"font_class": "star-filled",
|
||||
"unicode": "\ue68f"
|
||||
},
|
||||
{
|
||||
"font_class": "starhalf",
|
||||
"unicode": "\ue683"
|
||||
},
|
||||
{
|
||||
"font_class": "trash",
|
||||
"unicode": "\ue687"
|
||||
},
|
||||
{
|
||||
"font_class": "trash-filled",
|
||||
"unicode": "\ue685"
|
||||
},
|
||||
{
|
||||
"font_class": "tune",
|
||||
"unicode": "\ue6aa"
|
||||
},
|
||||
{
|
||||
"font_class": "tune-filled",
|
||||
"unicode": "\ue6ca"
|
||||
},
|
||||
{
|
||||
"font_class": "undo",
|
||||
"unicode": "\ue64f"
|
||||
},
|
||||
{
|
||||
"font_class": "undo-filled",
|
||||
"unicode": "\ue64c"
|
||||
},
|
||||
{
|
||||
"font_class": "up",
|
||||
"unicode": "\ue6b6"
|
||||
},
|
||||
{
|
||||
"font_class": "top",
|
||||
"unicode": "\ue6b6"
|
||||
},
|
||||
{
|
||||
"font_class": "upload",
|
||||
"unicode": "\ue690"
|
||||
},
|
||||
{
|
||||
"font_class": "upload-filled",
|
||||
"unicode": "\ue68e"
|
||||
},
|
||||
{
|
||||
"font_class": "videocam",
|
||||
"unicode": "\ue68c"
|
||||
},
|
||||
{
|
||||
"font_class": "videocam-filled",
|
||||
"unicode": "\ue689"
|
||||
},
|
||||
{
|
||||
"font_class": "vip",
|
||||
"unicode": "\ue6a8"
|
||||
},
|
||||
{
|
||||
"font_class": "vip-filled",
|
||||
"unicode": "\ue6c6"
|
||||
},
|
||||
{
|
||||
"font_class": "wallet",
|
||||
"unicode": "\ue6b1"
|
||||
},
|
||||
{
|
||||
"font_class": "wallet-filled",
|
||||
"unicode": "\ue6c2"
|
||||
},
|
||||
{
|
||||
"font_class": "weibo",
|
||||
"unicode": "\ue68b"
|
||||
},
|
||||
{
|
||||
"font_class": "weixin",
|
||||
"unicode": "\ue691"
|
||||
}
|
||||
] as IconsDataItem[]
|
||||
|
||||
// export const fontData = JSON.parse<IconsDataItem>(fontDataJson)
|
|
@ -0,0 +1,649 @@
|
|||
|
||||
export const fontData = [
|
||||
{
|
||||
"font_class": "arrow-down",
|
||||
"unicode": "\ue6be"
|
||||
},
|
||||
{
|
||||
"font_class": "arrow-left",
|
||||
"unicode": "\ue6bc"
|
||||
},
|
||||
{
|
||||
"font_class": "arrow-right",
|
||||
"unicode": "\ue6bb"
|
||||
},
|
||||
{
|
||||
"font_class": "arrow-up",
|
||||
"unicode": "\ue6bd"
|
||||
},
|
||||
{
|
||||
"font_class": "auth",
|
||||
"unicode": "\ue6ab"
|
||||
},
|
||||
{
|
||||
"font_class": "auth-filled",
|
||||
"unicode": "\ue6cc"
|
||||
},
|
||||
{
|
||||
"font_class": "back",
|
||||
"unicode": "\ue6b9"
|
||||
},
|
||||
{
|
||||
"font_class": "bars",
|
||||
"unicode": "\ue627"
|
||||
},
|
||||
{
|
||||
"font_class": "calendar",
|
||||
"unicode": "\ue6a0"
|
||||
},
|
||||
{
|
||||
"font_class": "calendar-filled",
|
||||
"unicode": "\ue6c0"
|
||||
},
|
||||
{
|
||||
"font_class": "camera",
|
||||
"unicode": "\ue65a"
|
||||
},
|
||||
{
|
||||
"font_class": "camera-filled",
|
||||
"unicode": "\ue658"
|
||||
},
|
||||
{
|
||||
"font_class": "cart",
|
||||
"unicode": "\ue631"
|
||||
},
|
||||
{
|
||||
"font_class": "cart-filled",
|
||||
"unicode": "\ue6d0"
|
||||
},
|
||||
{
|
||||
"font_class": "chat",
|
||||
"unicode": "\ue65d"
|
||||
},
|
||||
{
|
||||
"font_class": "chat-filled",
|
||||
"unicode": "\ue659"
|
||||
},
|
||||
{
|
||||
"font_class": "chatboxes",
|
||||
"unicode": "\ue696"
|
||||
},
|
||||
{
|
||||
"font_class": "chatboxes-filled",
|
||||
"unicode": "\ue692"
|
||||
},
|
||||
{
|
||||
"font_class": "chatbubble",
|
||||
"unicode": "\ue697"
|
||||
},
|
||||
{
|
||||
"font_class": "chatbubble-filled",
|
||||
"unicode": "\ue694"
|
||||
},
|
||||
{
|
||||
"font_class": "checkbox",
|
||||
"unicode": "\ue62b"
|
||||
},
|
||||
{
|
||||
"font_class": "checkbox-filled",
|
||||
"unicode": "\ue62c"
|
||||
},
|
||||
{
|
||||
"font_class": "checkmarkempty",
|
||||
"unicode": "\ue65c"
|
||||
},
|
||||
{
|
||||
"font_class": "circle",
|
||||
"unicode": "\ue65b"
|
||||
},
|
||||
{
|
||||
"font_class": "circle-filled",
|
||||
"unicode": "\ue65e"
|
||||
},
|
||||
{
|
||||
"font_class": "clear",
|
||||
"unicode": "\ue66d"
|
||||
},
|
||||
{
|
||||
"font_class": "close",
|
||||
"unicode": "\ue673"
|
||||
},
|
||||
{
|
||||
"font_class": "closeempty",
|
||||
"unicode": "\ue66c"
|
||||
},
|
||||
{
|
||||
"font_class": "cloud-download",
|
||||
"unicode": "\ue647"
|
||||
},
|
||||
{
|
||||
"font_class": "cloud-download-filled",
|
||||
"unicode": "\ue646"
|
||||
},
|
||||
{
|
||||
"font_class": "cloud-upload",
|
||||
"unicode": "\ue645"
|
||||
},
|
||||
{
|
||||
"font_class": "cloud-upload-filled",
|
||||
"unicode": "\ue648"
|
||||
},
|
||||
{
|
||||
"font_class": "color",
|
||||
"unicode": "\ue6cf"
|
||||
},
|
||||
{
|
||||
"font_class": "color-filled",
|
||||
"unicode": "\ue6c9"
|
||||
},
|
||||
{
|
||||
"font_class": "compose",
|
||||
"unicode": "\ue67f"
|
||||
},
|
||||
{
|
||||
"font_class": "contact",
|
||||
"unicode": "\ue693"
|
||||
},
|
||||
{
|
||||
"font_class": "contact-filled",
|
||||
"unicode": "\ue695"
|
||||
},
|
||||
{
|
||||
"font_class": "down",
|
||||
"unicode": "\ue6b8"
|
||||
},
|
||||
{
|
||||
"font_class": "bottom",
|
||||
"unicode": "\ue6b8"
|
||||
},
|
||||
{
|
||||
"font_class": "download",
|
||||
"unicode": "\ue68d"
|
||||
},
|
||||
{
|
||||
"font_class": "download-filled",
|
||||
"unicode": "\ue681"
|
||||
},
|
||||
{
|
||||
"font_class": "email",
|
||||
"unicode": "\ue69e"
|
||||
},
|
||||
{
|
||||
"font_class": "email-filled",
|
||||
"unicode": "\ue69a"
|
||||
},
|
||||
{
|
||||
"font_class": "eye",
|
||||
"unicode": "\ue651"
|
||||
},
|
||||
{
|
||||
"font_class": "eye-filled",
|
||||
"unicode": "\ue66a"
|
||||
},
|
||||
{
|
||||
"font_class": "eye-slash",
|
||||
"unicode": "\ue6b3"
|
||||
},
|
||||
{
|
||||
"font_class": "eye-slash-filled",
|
||||
"unicode": "\ue6b4"
|
||||
},
|
||||
{
|
||||
"font_class": "fire",
|
||||
"unicode": "\ue6a1"
|
||||
},
|
||||
{
|
||||
"font_class": "fire-filled",
|
||||
"unicode": "\ue6c5"
|
||||
},
|
||||
{
|
||||
"font_class": "flag",
|
||||
"unicode": "\ue65f"
|
||||
},
|
||||
{
|
||||
"font_class": "flag-filled",
|
||||
"unicode": "\ue660"
|
||||
},
|
||||
{
|
||||
"font_class": "folder-add",
|
||||
"unicode": "\ue6a9"
|
||||
},
|
||||
{
|
||||
"font_class": "folder-add-filled",
|
||||
"unicode": "\ue6c8"
|
||||
},
|
||||
{
|
||||
"font_class": "font",
|
||||
"unicode": "\ue6a3"
|
||||
},
|
||||
{
|
||||
"font_class": "forward",
|
||||
"unicode": "\ue6ba"
|
||||
},
|
||||
{
|
||||
"font_class": "gear",
|
||||
"unicode": "\ue664"
|
||||
},
|
||||
{
|
||||
"font_class": "gear-filled",
|
||||
"unicode": "\ue661"
|
||||
},
|
||||
{
|
||||
"font_class": "gift",
|
||||
"unicode": "\ue6a4"
|
||||
},
|
||||
{
|
||||
"font_class": "gift-filled",
|
||||
"unicode": "\ue6c4"
|
||||
},
|
||||
{
|
||||
"font_class": "hand-down",
|
||||
"unicode": "\ue63d"
|
||||
},
|
||||
{
|
||||
"font_class": "hand-down-filled",
|
||||
"unicode": "\ue63c"
|
||||
},
|
||||
{
|
||||
"font_class": "hand-up",
|
||||
"unicode": "\ue63f"
|
||||
},
|
||||
{
|
||||
"font_class": "hand-up-filled",
|
||||
"unicode": "\ue63e"
|
||||
},
|
||||
{
|
||||
"font_class": "headphones",
|
||||
"unicode": "\ue630"
|
||||
},
|
||||
{
|
||||
"font_class": "heart",
|
||||
"unicode": "\ue639"
|
||||
},
|
||||
{
|
||||
"font_class": "heart-filled",
|
||||
"unicode": "\ue641"
|
||||
},
|
||||
{
|
||||
"font_class": "help",
|
||||
"unicode": "\ue679"
|
||||
},
|
||||
{
|
||||
"font_class": "help-filled",
|
||||
"unicode": "\ue674"
|
||||
},
|
||||
{
|
||||
"font_class": "home",
|
||||
"unicode": "\ue662"
|
||||
},
|
||||
{
|
||||
"font_class": "home-filled",
|
||||
"unicode": "\ue663"
|
||||
},
|
||||
{
|
||||
"font_class": "image",
|
||||
"unicode": "\ue670"
|
||||
},
|
||||
{
|
||||
"font_class": "image-filled",
|
||||
"unicode": "\ue678"
|
||||
},
|
||||
{
|
||||
"font_class": "images",
|
||||
"unicode": "\ue650"
|
||||
},
|
||||
{
|
||||
"font_class": "images-filled",
|
||||
"unicode": "\ue64b"
|
||||
},
|
||||
{
|
||||
"font_class": "info",
|
||||
"unicode": "\ue669"
|
||||
},
|
||||
{
|
||||
"font_class": "info-filled",
|
||||
"unicode": "\ue649"
|
||||
},
|
||||
{
|
||||
"font_class": "left",
|
||||
"unicode": "\ue6b7"
|
||||
},
|
||||
{
|
||||
"font_class": "link",
|
||||
"unicode": "\ue6a5"
|
||||
},
|
||||
{
|
||||
"font_class": "list",
|
||||
"unicode": "\ue644"
|
||||
},
|
||||
{
|
||||
"font_class": "location",
|
||||
"unicode": "\ue6ae"
|
||||
},
|
||||
{
|
||||
"font_class": "location-filled",
|
||||
"unicode": "\ue6af"
|
||||
},
|
||||
{
|
||||
"font_class": "locked",
|
||||
"unicode": "\ue66b"
|
||||
},
|
||||
{
|
||||
"font_class": "locked-filled",
|
||||
"unicode": "\ue668"
|
||||
},
|
||||
{
|
||||
"font_class": "loop",
|
||||
"unicode": "\ue633"
|
||||
},
|
||||
{
|
||||
"font_class": "mail-open",
|
||||
"unicode": "\ue643"
|
||||
},
|
||||
{
|
||||
"font_class": "mail-open-filled",
|
||||
"unicode": "\ue63a"
|
||||
},
|
||||
{
|
||||
"font_class": "map",
|
||||
"unicode": "\ue667"
|
||||
},
|
||||
{
|
||||
"font_class": "map-filled",
|
||||
"unicode": "\ue666"
|
||||
},
|
||||
{
|
||||
"font_class": "map-pin",
|
||||
"unicode": "\ue6ad"
|
||||
},
|
||||
{
|
||||
"font_class": "map-pin-ellipse",
|
||||
"unicode": "\ue6ac"
|
||||
},
|
||||
{
|
||||
"font_class": "medal",
|
||||
"unicode": "\ue6a2"
|
||||
},
|
||||
{
|
||||
"font_class": "medal-filled",
|
||||
"unicode": "\ue6c3"
|
||||
},
|
||||
{
|
||||
"font_class": "mic",
|
||||
"unicode": "\ue671"
|
||||
},
|
||||
{
|
||||
"font_class": "mic-filled",
|
||||
"unicode": "\ue677"
|
||||
},
|
||||
{
|
||||
"font_class": "micoff",
|
||||
"unicode": "\ue67e"
|
||||
},
|
||||
{
|
||||
"font_class": "micoff-filled",
|
||||
"unicode": "\ue6b0"
|
||||
},
|
||||
{
|
||||
"font_class": "minus",
|
||||
"unicode": "\ue66f"
|
||||
},
|
||||
{
|
||||
"font_class": "minus-filled",
|
||||
"unicode": "\ue67d"
|
||||
},
|
||||
{
|
||||
"font_class": "more",
|
||||
"unicode": "\ue64d"
|
||||
},
|
||||
{
|
||||
"font_class": "more-filled",
|
||||
"unicode": "\ue64e"
|
||||
},
|
||||
{
|
||||
"font_class": "navigate",
|
||||
"unicode": "\ue66e"
|
||||
},
|
||||
{
|
||||
"font_class": "navigate-filled",
|
||||
"unicode": "\ue67a"
|
||||
},
|
||||
{
|
||||
"font_class": "notification",
|
||||
"unicode": "\ue6a6"
|
||||
},
|
||||
{
|
||||
"font_class": "notification-filled",
|
||||
"unicode": "\ue6c1"
|
||||
},
|
||||
{
|
||||
"font_class": "paperclip",
|
||||
"unicode": "\ue652"
|
||||
},
|
||||
{
|
||||
"font_class": "paperplane",
|
||||
"unicode": "\ue672"
|
||||
},
|
||||
{
|
||||
"font_class": "paperplane-filled",
|
||||
"unicode": "\ue675"
|
||||
},
|
||||
{
|
||||
"font_class": "person",
|
||||
"unicode": "\ue699"
|
||||
},
|
||||
{
|
||||
"font_class": "person-filled",
|
||||
"unicode": "\ue69d"
|
||||
},
|
||||
{
|
||||
"font_class": "personadd",
|
||||
"unicode": "\ue69f"
|
||||
},
|
||||
{
|
||||
"font_class": "personadd-filled",
|
||||
"unicode": "\ue698"
|
||||
},
|
||||
{
|
||||
"font_class": "personadd-filled-copy",
|
||||
"unicode": "\ue6d1"
|
||||
},
|
||||
{
|
||||
"font_class": "phone",
|
||||
"unicode": "\ue69c"
|
||||
},
|
||||
{
|
||||
"font_class": "phone-filled",
|
||||
"unicode": "\ue69b"
|
||||
},
|
||||
{
|
||||
"font_class": "plus",
|
||||
"unicode": "\ue676"
|
||||
},
|
||||
{
|
||||
"font_class": "plus-filled",
|
||||
"unicode": "\ue6c7"
|
||||
},
|
||||
{
|
||||
"font_class": "plusempty",
|
||||
"unicode": "\ue67b"
|
||||
},
|
||||
{
|
||||
"font_class": "pulldown",
|
||||
"unicode": "\ue632"
|
||||
},
|
||||
{
|
||||
"font_class": "pyq",
|
||||
"unicode": "\ue682"
|
||||
},
|
||||
{
|
||||
"font_class": "qq",
|
||||
"unicode": "\ue680"
|
||||
},
|
||||
{
|
||||
"font_class": "redo",
|
||||
"unicode": "\ue64a"
|
||||
},
|
||||
{
|
||||
"font_class": "redo-filled",
|
||||
"unicode": "\ue655"
|
||||
},
|
||||
{
|
||||
"font_class": "refresh",
|
||||
"unicode": "\ue657"
|
||||
},
|
||||
{
|
||||
"font_class": "refresh-filled",
|
||||
"unicode": "\ue656"
|
||||
},
|
||||
{
|
||||
"font_class": "refreshempty",
|
||||
"unicode": "\ue6bf"
|
||||
},
|
||||
{
|
||||
"font_class": "reload",
|
||||
"unicode": "\ue6b2"
|
||||
},
|
||||
{
|
||||
"font_class": "right",
|
||||
"unicode": "\ue6b5"
|
||||
},
|
||||
{
|
||||
"font_class": "scan",
|
||||
"unicode": "\ue62a"
|
||||
},
|
||||
{
|
||||
"font_class": "search",
|
||||
"unicode": "\ue654"
|
||||
},
|
||||
{
|
||||
"font_class": "settings",
|
||||
"unicode": "\ue653"
|
||||
},
|
||||
{
|
||||
"font_class": "settings-filled",
|
||||
"unicode": "\ue6ce"
|
||||
},
|
||||
{
|
||||
"font_class": "shop",
|
||||
"unicode": "\ue62f"
|
||||
},
|
||||
{
|
||||
"font_class": "shop-filled",
|
||||
"unicode": "\ue6cd"
|
||||
},
|
||||
{
|
||||
"font_class": "smallcircle",
|
||||
"unicode": "\ue67c"
|
||||
},
|
||||
{
|
||||
"font_class": "smallcircle-filled",
|
||||
"unicode": "\ue665"
|
||||
},
|
||||
{
|
||||
"font_class": "sound",
|
||||
"unicode": "\ue684"
|
||||
},
|
||||
{
|
||||
"font_class": "sound-filled",
|
||||
"unicode": "\ue686"
|
||||
},
|
||||
{
|
||||
"font_class": "spinner-cycle",
|
||||
"unicode": "\ue68a"
|
||||
},
|
||||
{
|
||||
"font_class": "staff",
|
||||
"unicode": "\ue6a7"
|
||||
},
|
||||
{
|
||||
"font_class": "staff-filled",
|
||||
"unicode": "\ue6cb"
|
||||
},
|
||||
{
|
||||
"font_class": "star",
|
||||
"unicode": "\ue688"
|
||||
},
|
||||
{
|
||||
"font_class": "star-filled",
|
||||
"unicode": "\ue68f"
|
||||
},
|
||||
{
|
||||
"font_class": "starhalf",
|
||||
"unicode": "\ue683"
|
||||
},
|
||||
{
|
||||
"font_class": "trash",
|
||||
"unicode": "\ue687"
|
||||
},
|
||||
{
|
||||
"font_class": "trash-filled",
|
||||
"unicode": "\ue685"
|
||||
},
|
||||
{
|
||||
"font_class": "tune",
|
||||
"unicode": "\ue6aa"
|
||||
},
|
||||
{
|
||||
"font_class": "tune-filled",
|
||||
"unicode": "\ue6ca"
|
||||
},
|
||||
{
|
||||
"font_class": "undo",
|
||||
"unicode": "\ue64f"
|
||||
},
|
||||
{
|
||||
"font_class": "undo-filled",
|
||||
"unicode": "\ue64c"
|
||||
},
|
||||
{
|
||||
"font_class": "up",
|
||||
"unicode": "\ue6b6"
|
||||
},
|
||||
{
|
||||
"font_class": "top",
|
||||
"unicode": "\ue6b6"
|
||||
},
|
||||
{
|
||||
"font_class": "upload",
|
||||
"unicode": "\ue690"
|
||||
},
|
||||
{
|
||||
"font_class": "upload-filled",
|
||||
"unicode": "\ue68e"
|
||||
},
|
||||
{
|
||||
"font_class": "videocam",
|
||||
"unicode": "\ue68c"
|
||||
},
|
||||
{
|
||||
"font_class": "videocam-filled",
|
||||
"unicode": "\ue689"
|
||||
},
|
||||
{
|
||||
"font_class": "vip",
|
||||
"unicode": "\ue6a8"
|
||||
},
|
||||
{
|
||||
"font_class": "vip-filled",
|
||||
"unicode": "\ue6c6"
|
||||
},
|
||||
{
|
||||
"font_class": "wallet",
|
||||
"unicode": "\ue6b1"
|
||||
},
|
||||
{
|
||||
"font_class": "wallet-filled",
|
||||
"unicode": "\ue6c2"
|
||||
},
|
||||
{
|
||||
"font_class": "weibo",
|
||||
"unicode": "\ue68b"
|
||||
},
|
||||
{
|
||||
"font_class": "weixin",
|
||||
"unicode": "\ue691"
|
||||
}
|
||||
]
|
||||
|
||||
// export const fontData = JSON.parse<IconsDataItem>(fontDataJson)
|
|
@ -0,0 +1,89 @@
|
|||
{
|
||||
"id": "uni-icons",
|
||||
"displayName": "uni-icons 图标",
|
||||
"version": "2.0.10",
|
||||
"description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
|
||||
"keywords": [
|
||||
"uni-ui",
|
||||
"uniui",
|
||||
"icon",
|
||||
"图标"
|
||||
],
|
||||
"repository": "https://github.com/dcloudio/uni-ui",
|
||||
"engines": {
|
||||
"HBuilderX": "^3.2.14"
|
||||
},
|
||||
"directories": {
|
||||
"example": "../../temps/example_temps"
|
||||
},
|
||||
"dcloudext": {
|
||||
"sale": {
|
||||
"regular": {
|
||||
"price": "0.00"
|
||||
},
|
||||
"sourcecode": {
|
||||
"price": "0.00"
|
||||
}
|
||||
},
|
||||
"contact": {
|
||||
"qq": ""
|
||||
},
|
||||
"declaration": {
|
||||
"ads": "无",
|
||||
"data": "无",
|
||||
"permissions": "无"
|
||||
},
|
||||
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
|
||||
"type": "component-vue"
|
||||
},
|
||||
"uni_modules": {
|
||||
"dependencies": ["uni-scss"],
|
||||
"encrypt": [],
|
||||
"platforms": {
|
||||
"cloud": {
|
||||
"tcb": "y",
|
||||
"aliyun": "y",
|
||||
"alipay": "n"
|
||||
},
|
||||
"client": {
|
||||
"App": {
|
||||
"app-vue": "y",
|
||||
"app-nvue": "y",
|
||||
"app-uvue": "y"
|
||||
},
|
||||
"H5-mobile": {
|
||||
"Safari": "y",
|
||||
"Android Browser": "y",
|
||||
"微信浏览器(Android)": "y",
|
||||
"QQ浏览器(Android)": "y"
|
||||
},
|
||||
"H5-pc": {
|
||||
"Chrome": "y",
|
||||
"IE": "y",
|
||||
"Edge": "y",
|
||||
"Firefox": "y",
|
||||
"Safari": "y"
|
||||
},
|
||||
"小程序": {
|
||||
"微信": "y",
|
||||
"阿里": "y",
|
||||
"百度": "y",
|
||||
"字节跳动": "y",
|
||||
"QQ": "y",
|
||||
"钉钉": "y",
|
||||
"快手": "y",
|
||||
"飞书": "y",
|
||||
"京东": "y"
|
||||
},
|
||||
"快应用": {
|
||||
"华为": "y",
|
||||
"联盟": "y"
|
||||
},
|
||||
"Vue": {
|
||||
"vue2": "y",
|
||||
"vue3": "y"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
## Icons 图标
|
||||
> **组件名:uni-icons**
|
||||
> 代码块: `uIcons`
|
||||
|
||||
用于展示 icons 图标 。
|
||||
|
||||
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-icons)
|
||||
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
|
|
@ -0,0 +1,8 @@
|
|||
## 1.0.3(2022-01-21)
|
||||
- 优化 组件示例
|
||||
## 1.0.2(2021-11-22)
|
||||
- 修复 / 符号在 vue 不同版本兼容问题引起的报错问题
|
||||
## 1.0.1(2021-11-22)
|
||||
- 修复 vue3中scss语法兼容问题
|
||||
## 1.0.0(2021-11-18)
|
||||
- init
|
|
@ -0,0 +1 @@
|
|||
@import './styles/index.scss';
|
|
@ -0,0 +1,82 @@
|
|||
{
|
||||
"id": "uni-scss",
|
||||
"displayName": "uni-scss 辅助样式",
|
||||
"version": "1.0.3",
|
||||
"description": "uni-sass是uni-ui提供的一套全局样式 ,通过一些简单的类名和sass变量,实现简单的页面布局操作,比如颜色、边距、圆角等。",
|
||||
"keywords": [
|
||||
"uni-scss",
|
||||
"uni-ui",
|
||||
"辅助样式"
|
||||
],
|
||||
"repository": "https://github.com/dcloudio/uni-ui",
|
||||
"engines": {
|
||||
"HBuilderX": "^3.1.0"
|
||||
},
|
||||
"dcloudext": {
|
||||
"category": [
|
||||
"JS SDK",
|
||||
"通用 SDK"
|
||||
],
|
||||
"sale": {
|
||||
"regular": {
|
||||
"price": "0.00"
|
||||
},
|
||||
"sourcecode": {
|
||||
"price": "0.00"
|
||||
}
|
||||
},
|
||||
"contact": {
|
||||
"qq": ""
|
||||
},
|
||||
"declaration": {
|
||||
"ads": "无",
|
||||
"data": "无",
|
||||
"permissions": "无"
|
||||
},
|
||||
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
|
||||
},
|
||||
"uni_modules": {
|
||||
"dependencies": [],
|
||||
"encrypt": [],
|
||||
"platforms": {
|
||||
"cloud": {
|
||||
"tcb": "y",
|
||||
"aliyun": "y"
|
||||
},
|
||||
"client": {
|
||||
"App": {
|
||||
"app-vue": "y",
|
||||
"app-nvue": "u"
|
||||
},
|
||||
"H5-mobile": {
|
||||
"Safari": "y",
|
||||
"Android Browser": "y",
|
||||
"微信浏览器(Android)": "y",
|
||||
"QQ浏览器(Android)": "y"
|
||||
},
|
||||
"H5-pc": {
|
||||
"Chrome": "y",
|
||||
"IE": "y",
|
||||
"Edge": "y",
|
||||
"Firefox": "y",
|
||||
"Safari": "y"
|
||||
},
|
||||
"小程序": {
|
||||
"微信": "y",
|
||||
"阿里": "y",
|
||||
"百度": "y",
|
||||
"字节跳动": "y",
|
||||
"QQ": "y"
|
||||
},
|
||||
"快应用": {
|
||||
"华为": "n",
|
||||
"联盟": "n"
|
||||
},
|
||||
"Vue": {
|
||||
"vue2": "y",
|
||||
"vue3": "y"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
`uni-sass` 是 `uni-ui`提供的一套全局样式 ,通过一些简单的类名和`sass`变量,实现简单的页面布局操作,比如颜色、边距、圆角等。
|
||||
|
||||
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-sass)
|
||||
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
|
|
@ -0,0 +1,7 @@
|
|||
@import './setting/_variables.scss';
|
||||
@import './setting/_border.scss';
|
||||
@import './setting/_color.scss';
|
||||
@import './setting/_space.scss';
|
||||
@import './setting/_radius.scss';
|
||||
@import './setting/_text.scss';
|
||||
@import './setting/_styles.scss';
|
|
@ -0,0 +1,3 @@
|
|||
.uni-border {
|
||||
border: 1px $uni-border-1 solid;
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
|
||||
// TODO 暂时不需要 class ,需要用户使用变量实现 ,如果使用类名其实并不推荐
|
||||
// @mixin get-styles($k,$c) {
|
||||
// @if $k == size or $k == weight{
|
||||
// font-#{$k}:#{$c}
|
||||
// }@else{
|
||||
// #{$k}:#{$c}
|
||||
// }
|
||||
// }
|
||||
$uni-ui-color:(
|
||||
// 主色
|
||||
primary: $uni-primary,
|
||||
primary-disable: $uni-primary-disable,
|
||||
primary-light: $uni-primary-light,
|
||||
// 辅助色
|
||||
success: $uni-success,
|
||||
success-disable: $uni-success-disable,
|
||||
success-light: $uni-success-light,
|
||||
warning: $uni-warning,
|
||||
warning-disable: $uni-warning-disable,
|
||||
warning-light: $uni-warning-light,
|
||||
error: $uni-error,
|
||||
error-disable: $uni-error-disable,
|
||||
error-light: $uni-error-light,
|
||||
info: $uni-info,
|
||||
info-disable: $uni-info-disable,
|
||||
info-light: $uni-info-light,
|
||||
// 中性色
|
||||
main-color: $uni-main-color,
|
||||
base-color: $uni-base-color,
|
||||
secondary-color: $uni-secondary-color,
|
||||
extra-color: $uni-extra-color,
|
||||
// 背景色
|
||||
bg-color: $uni-bg-color,
|
||||
// 边框颜色
|
||||
border-1: $uni-border-1,
|
||||
border-2: $uni-border-2,
|
||||
border-3: $uni-border-3,
|
||||
border-4: $uni-border-4,
|
||||
// 黑色
|
||||
black:$uni-black,
|
||||
// 白色
|
||||
white:$uni-white,
|
||||
// 透明
|
||||
transparent:$uni-transparent
|
||||
) !default;
|
||||
@each $key, $child in $uni-ui-color {
|
||||
.uni-#{"" + $key} {
|
||||
color: $child;
|
||||
}
|
||||
.uni-#{"" + $key}-bg {
|
||||
background-color: $child;
|
||||
}
|
||||
}
|
||||
.uni-shadow-sm {
|
||||
box-shadow: $uni-shadow-sm;
|
||||
}
|
||||
.uni-shadow-base {
|
||||
box-shadow: $uni-shadow-base;
|
||||
}
|
||||
.uni-shadow-lg {
|
||||
box-shadow: $uni-shadow-lg;
|
||||
}
|
||||
.uni-mask {
|
||||
background-color:$uni-mask;
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
@mixin radius($r,$d:null ,$important: false){
|
||||
$radius-value:map-get($uni-radius, $r) if($important, !important, null);
|
||||
// Key exists within the $uni-radius variable
|
||||
@if (map-has-key($uni-radius, $r) and $d){
|
||||
@if $d == t {
|
||||
border-top-left-radius:$radius-value;
|
||||
border-top-right-radius:$radius-value;
|
||||
}@else if $d == r {
|
||||
border-top-right-radius:$radius-value;
|
||||
border-bottom-right-radius:$radius-value;
|
||||
}@else if $d == b {
|
||||
border-bottom-left-radius:$radius-value;
|
||||
border-bottom-right-radius:$radius-value;
|
||||
}@else if $d == l {
|
||||
border-top-left-radius:$radius-value;
|
||||
border-bottom-left-radius:$radius-value;
|
||||
}@else if $d == tl {
|
||||
border-top-left-radius:$radius-value;
|
||||
}@else if $d == tr {
|
||||
border-top-right-radius:$radius-value;
|
||||
}@else if $d == br {
|
||||
border-bottom-right-radius:$radius-value;
|
||||
}@else if $d == bl {
|
||||
border-bottom-left-radius:$radius-value;
|
||||
}
|
||||
}@else{
|
||||
border-radius:$radius-value;
|
||||
}
|
||||
}
|
||||
|
||||
@each $key, $child in $uni-radius {
|
||||
@if($key){
|
||||
.uni-radius-#{"" + $key} {
|
||||
@include radius($key)
|
||||
}
|
||||
}@else{
|
||||
.uni-radius {
|
||||
@include radius($key)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@each $direction in t, r, b, l,tl, tr, br, bl {
|
||||
@each $key, $child in $uni-radius {
|
||||
@if($key){
|
||||
.uni-radius-#{"" + $direction}-#{"" + $key} {
|
||||
@include radius($key,$direction,false)
|
||||
}
|
||||
}@else{
|
||||
.uni-radius-#{$direction} {
|
||||
@include radius($key,$direction,false)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
|
||||
@mixin fn($space,$direction,$size,$n) {
|
||||
@if $n {
|
||||
#{$space}-#{$direction}: #{$size*$uni-space-root}px
|
||||
} @else {
|
||||
#{$space}-#{$direction}: #{-$size*$uni-space-root}px
|
||||
}
|
||||
}
|
||||
@mixin get-styles($direction,$i,$space,$n){
|
||||
@if $direction == t {
|
||||
@include fn($space, top,$i,$n);
|
||||
}
|
||||
@if $direction == r {
|
||||
@include fn($space, right,$i,$n);
|
||||
}
|
||||
@if $direction == b {
|
||||
@include fn($space, bottom,$i,$n);
|
||||
}
|
||||
@if $direction == l {
|
||||
@include fn($space, left,$i,$n);
|
||||
}
|
||||
@if $direction == x {
|
||||
@include fn($space, left,$i,$n);
|
||||
@include fn($space, right,$i,$n);
|
||||
}
|
||||
@if $direction == y {
|
||||
@include fn($space, top,$i,$n);
|
||||
@include fn($space, bottom,$i,$n);
|
||||
}
|
||||
@if $direction == a {
|
||||
@if $n {
|
||||
#{$space}:#{$i*$uni-space-root}px;
|
||||
} @else {
|
||||
#{$space}:#{-$i*$uni-space-root}px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@each $orientation in m,p {
|
||||
$space: margin;
|
||||
@if $orientation == m {
|
||||
$space: margin;
|
||||
} @else {
|
||||
$space: padding;
|
||||
}
|
||||
@for $i from 0 through 16 {
|
||||
@each $direction in t, r, b, l, x, y, a {
|
||||
.uni-#{$orientation}#{$direction}-#{$i} {
|
||||
@include get-styles($direction,$i,$space,true);
|
||||
}
|
||||
.uni-#{$orientation}#{$direction}-n#{$i} {
|
||||
@include get-styles($direction,$i,$space,false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,167 @@
|
|||
/* #ifndef APP-NVUE */
|
||||
|
||||
$-color-white:#fff;
|
||||
$-color-black:#000;
|
||||
@mixin base-style($color) {
|
||||
color: #fff;
|
||||
background-color: $color;
|
||||
border-color: mix($-color-black, $color, 8%);
|
||||
&:not([hover-class]):active {
|
||||
background: mix($-color-black, $color, 10%);
|
||||
border-color: mix($-color-black, $color, 20%);
|
||||
color: $-color-white;
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
@mixin is-color($color) {
|
||||
@include base-style($color);
|
||||
&[loading] {
|
||||
@include base-style($color);
|
||||
&::before {
|
||||
margin-right:5px;
|
||||
}
|
||||
}
|
||||
&[disabled] {
|
||||
&,
|
||||
&[loading],
|
||||
&:not([hover-class]):active {
|
||||
color: $-color-white;
|
||||
border-color: mix(darken($color,10%), $-color-white);
|
||||
background-color: mix($color, $-color-white);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@mixin base-plain-style($color) {
|
||||
color:$color;
|
||||
background-color: mix($-color-white, $color, 90%);
|
||||
border-color: mix($-color-white, $color, 70%);
|
||||
&:not([hover-class]):active {
|
||||
background: mix($-color-white, $color, 80%);
|
||||
color: $color;
|
||||
outline: none;
|
||||
border-color: mix($-color-white, $color, 50%);
|
||||
}
|
||||
}
|
||||
@mixin is-plain($color){
|
||||
&[plain] {
|
||||
@include base-plain-style($color);
|
||||
&[loading] {
|
||||
@include base-plain-style($color);
|
||||
&::before {
|
||||
margin-right:5px;
|
||||
}
|
||||
}
|
||||
&[disabled] {
|
||||
&,
|
||||
&:active {
|
||||
color: mix($-color-white, $color, 40%);
|
||||
background-color: mix($-color-white, $color, 90%);
|
||||
border-color: mix($-color-white, $color, 80%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.uni-btn {
|
||||
margin: 5px;
|
||||
color: #393939;
|
||||
border:1px solid #ccc;
|
||||
font-size: 16px;
|
||||
font-weight: 200;
|
||||
background-color: #F9F9F9;
|
||||
// TODO 暂时处理边框隐藏一边的问题
|
||||
overflow: visible;
|
||||
&::after{
|
||||
border: none;
|
||||
}
|
||||
|
||||
&:not([type]),&[type=default] {
|
||||
color: #999;
|
||||
&[loading] {
|
||||
background: none;
|
||||
&::before {
|
||||
margin-right:5px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
&[disabled]{
|
||||
color: mix($-color-white, #999, 60%);
|
||||
&,
|
||||
&[loading],
|
||||
&:active {
|
||||
color: mix($-color-white, #999, 60%);
|
||||
background-color: mix($-color-white,$-color-black , 98%);
|
||||
border-color: mix($-color-white, #999, 85%);
|
||||
}
|
||||
}
|
||||
|
||||
&[plain] {
|
||||
color: #999;
|
||||
background: none;
|
||||
border-color: $uni-border-1;
|
||||
&:not([hover-class]):active {
|
||||
background: none;
|
||||
color: mix($-color-white, $-color-black, 80%);
|
||||
border-color: mix($-color-white, $-color-black, 90%);
|
||||
outline: none;
|
||||
}
|
||||
&[disabled]{
|
||||
&,
|
||||
&[loading],
|
||||
&:active {
|
||||
background: none;
|
||||
color: mix($-color-white, #999, 60%);
|
||||
border-color: mix($-color-white, #999, 85%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:not([hover-class]):active {
|
||||
color: mix($-color-white, $-color-black, 50%);
|
||||
}
|
||||
|
||||
&[size=mini] {
|
||||
font-size: 16px;
|
||||
font-weight: 200;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
&.uni-btn-small {
|
||||
font-size: 14px;
|
||||
}
|
||||
&.uni-btn-mini {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
&.uni-btn-radius {
|
||||
border-radius: 999px;
|
||||
}
|
||||
&[type=primary] {
|
||||
@include is-color($uni-primary);
|
||||
@include is-plain($uni-primary)
|
||||
}
|
||||
&[type=success] {
|
||||
@include is-color($uni-success);
|
||||
@include is-plain($uni-success)
|
||||
}
|
||||
&[type=error] {
|
||||
@include is-color($uni-error);
|
||||
@include is-plain($uni-error)
|
||||
}
|
||||
&[type=warning] {
|
||||
@include is-color($uni-warning);
|
||||
@include is-plain($uni-warning)
|
||||
}
|
||||
&[type=info] {
|
||||
@include is-color($uni-info);
|
||||
@include is-plain($uni-info)
|
||||
}
|
||||
}
|
||||
/* #endif */
|
|
@ -0,0 +1,24 @@
|
|||
@mixin get-styles($k,$c) {
|
||||
@if $k == size or $k == weight{
|
||||
font-#{$k}:#{$c}
|
||||
}@else{
|
||||
#{$k}:#{$c}
|
||||
}
|
||||
}
|
||||
|
||||
@each $key, $child in $uni-headings {
|
||||
/* #ifndef APP-NVUE */
|
||||
.uni-#{$key} {
|
||||
@each $k, $c in $child {
|
||||
@include get-styles($k,$c)
|
||||
}
|
||||
}
|
||||
/* #endif */
|
||||
/* #ifdef APP-NVUE */
|
||||
.container .uni-#{$key} {
|
||||
@each $k, $c in $child {
|
||||
@include get-styles($k,$c)
|
||||
}
|
||||
}
|
||||
/* #endif */
|
||||
}
|
|
@ -0,0 +1,146 @@
|
|||
// @use "sass:math";
|
||||
@import '../tools/functions.scss';
|
||||
// 间距基础倍数
|
||||
$uni-space-root: 2 !default;
|
||||
// 边框半径默认值
|
||||
$uni-radius-root:5px !default;
|
||||
$uni-radius: () !default;
|
||||
// 边框半径断点
|
||||
$uni-radius: map-deep-merge(
|
||||
(
|
||||
0: 0,
|
||||
// TODO 当前版本暂时不支持 sm 属性
|
||||
// 'sm': math.div($uni-radius-root, 2),
|
||||
null: $uni-radius-root,
|
||||
'lg': $uni-radius-root * 2,
|
||||
'xl': $uni-radius-root * 6,
|
||||
'pill': 9999px,
|
||||
'circle': 50%
|
||||
),
|
||||
$uni-radius
|
||||
);
|
||||
// 字体家族
|
||||
$body-font-family: 'Roboto', sans-serif !default;
|
||||
// 文本
|
||||
$heading-font-family: $body-font-family !default;
|
||||
$uni-headings: () !default;
|
||||
$letterSpacing: -0.01562em;
|
||||
$uni-headings: map-deep-merge(
|
||||
(
|
||||
'h1': (
|
||||
size: 32px,
|
||||
weight: 300,
|
||||
line-height: 50px,
|
||||
// letter-spacing:-0.01562em
|
||||
),
|
||||
'h2': (
|
||||
size: 28px,
|
||||
weight: 300,
|
||||
line-height: 40px,
|
||||
// letter-spacing: -0.00833em
|
||||
),
|
||||
'h3': (
|
||||
size: 24px,
|
||||
weight: 400,
|
||||
line-height: 32px,
|
||||
// letter-spacing: normal
|
||||
),
|
||||
'h4': (
|
||||
size: 20px,
|
||||
weight: 400,
|
||||
line-height: 30px,
|
||||
// letter-spacing: 0.00735em
|
||||
),
|
||||
'h5': (
|
||||
size: 16px,
|
||||
weight: 400,
|
||||
line-height: 24px,
|
||||
// letter-spacing: normal
|
||||
),
|
||||
'h6': (
|
||||
size: 14px,
|
||||
weight: 500,
|
||||
line-height: 18px,
|
||||
// letter-spacing: 0.0125em
|
||||
),
|
||||
'subtitle': (
|
||||
size: 12px,
|
||||
weight: 400,
|
||||
line-height: 20px,
|
||||
// letter-spacing: 0.00937em
|
||||
),
|
||||
'body': (
|
||||
font-size: 14px,
|
||||
font-weight: 400,
|
||||
line-height: 22px,
|
||||
// letter-spacing: 0.03125em
|
||||
),
|
||||
'caption': (
|
||||
'size': 12px,
|
||||
'weight': 400,
|
||||
'line-height': 20px,
|
||||
// 'letter-spacing': 0.03333em,
|
||||
// 'text-transform': false
|
||||
)
|
||||
),
|
||||
$uni-headings
|
||||
);
|
||||
|
||||
|
||||
|
||||
// 主色
|
||||
$uni-primary: #2979ff !default;
|
||||
$uni-primary-disable:lighten($uni-primary,20%) !default;
|
||||
$uni-primary-light: lighten($uni-primary,25%) !default;
|
||||
|
||||
// 辅助色
|
||||
// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
|
||||
$uni-success: #18bc37 !default;
|
||||
$uni-success-disable:lighten($uni-success,20%) !default;
|
||||
$uni-success-light: lighten($uni-success,25%) !default;
|
||||
|
||||
$uni-warning: #f3a73f !default;
|
||||
$uni-warning-disable:lighten($uni-warning,20%) !default;
|
||||
$uni-warning-light: lighten($uni-warning,25%) !default;
|
||||
|
||||
$uni-error: #e43d33 !default;
|
||||
$uni-error-disable:lighten($uni-error,20%) !default;
|
||||
$uni-error-light: lighten($uni-error,25%) !default;
|
||||
|
||||
$uni-info: #8f939c !default;
|
||||
$uni-info-disable:lighten($uni-info,20%) !default;
|
||||
$uni-info-light: lighten($uni-info,25%) !default;
|
||||
|
||||
// 中性色
|
||||
// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
|
||||
$uni-main-color: #3a3a3a !default; // 主要文字
|
||||
$uni-base-color: #6a6a6a !default; // 常规文字
|
||||
$uni-secondary-color: #909399 !default; // 次要文字
|
||||
$uni-extra-color: #c7c7c7 !default; // 辅助说明
|
||||
|
||||
// 边框颜色
|
||||
$uni-border-1: #F0F0F0 !default;
|
||||
$uni-border-2: #EDEDED !default;
|
||||
$uni-border-3: #DCDCDC !default;
|
||||
$uni-border-4: #B9B9B9 !default;
|
||||
|
||||
// 常规色
|
||||
$uni-black: #000000 !default;
|
||||
$uni-white: #ffffff !default;
|
||||
$uni-transparent: rgba($color: #000000, $alpha: 0) !default;
|
||||
|
||||
// 背景色
|
||||
$uni-bg-color: #f7f7f7 !default;
|
||||
|
||||
/* 水平间距 */
|
||||
$uni-spacing-sm: 8px !default;
|
||||
$uni-spacing-base: 15px !default;
|
||||
$uni-spacing-lg: 30px !default;
|
||||
|
||||
// 阴影
|
||||
$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5) !default;
|
||||
$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2) !default;
|
||||
$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5) !default;
|
||||
|
||||
// 蒙版
|
||||
$uni-mask: rgba($color: #000000, $alpha: 0.4) !default;
|
|
@ -0,0 +1,19 @@
|
|||
// 合并 map
|
||||
@function map-deep-merge($parent-map, $child-map){
|
||||
$result: $parent-map;
|
||||
@each $key, $child in $child-map {
|
||||
$parent-has-key: map-has-key($result, $key);
|
||||
$parent-value: map-get($result, $key);
|
||||
$parent-type: type-of($parent-value);
|
||||
$child-type: type-of($child);
|
||||
$parent-is-map: $parent-type == map;
|
||||
$child-is-map: $child-type == map;
|
||||
|
||||
@if (not $parent-has-key) or ($parent-type != $child-type) or (not ($parent-is-map and $child-is-map)){
|
||||
$result: map-merge($result, ( $key: $child ));
|
||||
}@else {
|
||||
$result: map-merge($result, ( $key: map-deep-merge($parent-value, $child) ));
|
||||
}
|
||||
}
|
||||
@return $result;
|
||||
};
|
|
@ -0,0 +1,31 @@
|
|||
// 间距基础倍数
|
||||
$uni-space-root: 2;
|
||||
// 边框半径默认值
|
||||
$uni-radius-root:5px;
|
||||
// 主色
|
||||
$uni-primary: #2979ff;
|
||||
// 辅助色
|
||||
$uni-success: #4cd964;
|
||||
// 警告色
|
||||
$uni-warning: #f0ad4e;
|
||||
// 错误色
|
||||
$uni-error: #dd524d;
|
||||
// 描述色
|
||||
$uni-info: #909399;
|
||||
// 中性色
|
||||
$uni-main-color: #303133;
|
||||
$uni-base-color: #606266;
|
||||
$uni-secondary-color: #909399;
|
||||
$uni-extra-color: #C0C4CC;
|
||||
// 背景色
|
||||
$uni-bg-color: #f5f5f5;
|
||||
// 边框颜色
|
||||
$uni-border-1: #DCDFE6;
|
||||
$uni-border-2: #E4E7ED;
|
||||
$uni-border-3: #EBEEF5;
|
||||
$uni-border-4: #F2F6FC;
|
||||
|
||||
// 常规色
|
||||
$uni-black: #000000;
|
||||
$uni-white: #ffffff;
|
||||
$uni-transparent: rgba($color: #000000, $alpha: 0);
|
|
@ -0,0 +1,62 @@
|
|||
@import './styles/setting/_variables.scss';
|
||||
// 间距基础倍数
|
||||
$uni-space-root: 2;
|
||||
// 边框半径默认值
|
||||
$uni-radius-root:5px;
|
||||
|
||||
// 主色
|
||||
$uni-primary: #2979ff;
|
||||
$uni-primary-disable:mix(#fff,$uni-primary,50%);
|
||||
$uni-primary-light: mix(#fff,$uni-primary,80%);
|
||||
|
||||
// 辅助色
|
||||
// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
|
||||
$uni-success: #18bc37;
|
||||
$uni-success-disable:mix(#fff,$uni-success,50%);
|
||||
$uni-success-light: mix(#fff,$uni-success,80%);
|
||||
|
||||
$uni-warning: #f3a73f;
|
||||
$uni-warning-disable:mix(#fff,$uni-warning,50%);
|
||||
$uni-warning-light: mix(#fff,$uni-warning,80%);
|
||||
|
||||
$uni-error: #e43d33;
|
||||
$uni-error-disable:mix(#fff,$uni-error,50%);
|
||||
$uni-error-light: mix(#fff,$uni-error,80%);
|
||||
|
||||
$uni-info: #8f939c;
|
||||
$uni-info-disable:mix(#fff,$uni-info,50%);
|
||||
$uni-info-light: mix(#fff,$uni-info,80%);
|
||||
|
||||
// 中性色
|
||||
// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
|
||||
$uni-main-color: #3a3a3a; // 主要文字
|
||||
$uni-base-color: #6a6a6a; // 常规文字
|
||||
$uni-secondary-color: #909399; // 次要文字
|
||||
$uni-extra-color: #c7c7c7; // 辅助说明
|
||||
|
||||
// 边框颜色
|
||||
$uni-border-1: #F0F0F0;
|
||||
$uni-border-2: #EDEDED;
|
||||
$uni-border-3: #DCDCDC;
|
||||
$uni-border-4: #B9B9B9;
|
||||
|
||||
// 常规色
|
||||
$uni-black: #000000;
|
||||
$uni-white: #ffffff;
|
||||
$uni-transparent: rgba($color: #000000, $alpha: 0);
|
||||
|
||||
// 背景色
|
||||
$uni-bg-color: #f7f7f7;
|
||||
|
||||
/* 水平间距 */
|
||||
$uni-spacing-sm: 8px;
|
||||
$uni-spacing-base: 15px;
|
||||
$uni-spacing-lg: 30px;
|
||||
|
||||
// 阴影
|
||||
$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5);
|
||||
$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2);
|
||||
$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5);
|
||||
|
||||
// 蒙版
|
||||
$uni-mask: rgba($color: #000000, $alpha: 0.4);
|
|
@ -0,0 +1,22 @@
|
|||
const validateFieldPhone = (rule, value, callback) => {
|
||||
// 严格匹配手机号正则
|
||||
const mobileReg = /^(?:(?:\+|00)86)?1(?:(?:3[\d])|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\d])|(?:9[189]))\d{8}$/
|
||||
if (!value) return callback(new Error('手机号不能为空'))
|
||||
// 执行正则验证
|
||||
if (!mobileReg.test(value)) {
|
||||
return callback(new Error('手机号码格式不正确'))
|
||||
}
|
||||
// 验证通过
|
||||
return callback()
|
||||
}
|
||||
|
||||
const validateFieldIdCard = (rule, value, callback) => {
|
||||
const mobileReg = /^[1-9]\d{5}(19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
|
||||
if (!value) return callback(new Error('身份证号不能为空'))
|
||||
if (!mobileReg.test(value)) {
|
||||
return callback(new Error('身份证号格式不正确'))
|
||||
}
|
||||
return callback()
|
||||
}
|
||||
|
||||
export { validateFieldPhone, validateFieldIdCard }
|
Loading…
Reference in New Issue