2f7e2ea6 by 杨炀

no message

1 parent 937f2316
import request from './request.js'
import config from '@/config.js'
import * as loginServer from '@/common/login.js';
import _ from 'lodash'
// 激活
export function active(data) {
......@@ -130,13 +129,13 @@ export function deptTreeSelect(params) {
})
}
const setIdToString = (list) => {
_.each(list, (l) => {
for (var l of list) {
l.id += ''
l.parentId += ''
if (l.children && l.children.length > 0) {
setIdToString(l.children)
}
})
}
}
// 会员认证
......@@ -806,7 +805,13 @@ export function submitCert(data) {
params: data
})
}
export function submitCert2(data) {
return request({
url: `/exam/payment/submitCerts/updateCerts`,
method: 'put',
params: data
})
}
export function getCertsLList(query) {
return request({
url: '/exam/payment/certsList',
......@@ -1226,3 +1231,21 @@ export function queryProcess(id) {
method: 'get'
})
}
export function checkPersonByPayIds(payIds) {
return request({
url: `/exam/person/checkPersonByPayIds/${payIds}`,
method: 'get'
})
}
export function checkPersonByExamIds(examIds) {
return request({
url: `/exam/person/checkPersonByExamIds/${examIds}`,
method: 'get'
})
}
export function checkPersonByPersonId(perId) {
return request({
url: `/exam/person/checkPersonByPersonId/${perId}`,
method: 'get'
})
}
\ No newline at end of file
......
import config from '@/config.js'
import _ from 'lodash'
import _ from 'underscore'
const excludeUrls = ['getMemberCountInfo', 'getInfo']
......
import CryptoJS from 'crypto-js'
export function szToHz(num) {
const hzArr = ['〇', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十']
return hzArr[parseInt(num)]
}
export function AESEncrypt(data) {
const key = CryptoJS.enc.Utf8.parse('abcdefgabcdegf21')
// 将数据转换为字符串
const parseByte2HexStr = (wordArray) => {
const hexStr = wordArray.ciphertext.toString(CryptoJS.enc.Hex)
return hexStr
}
let dataStr
if (typeof data === 'object') {
dataStr = JSON.stringify(data)
} else {
dataStr = String(data)
}
// 加密
const encrypted = CryptoJS.AES.encrypt(CryptoJS.enc.Utf8.parse(dataStr), key, {
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7
})
return parseByte2HexStr(encrypted)
}
export function AESDecrypt(str) {
const key = CryptoJS.enc.Utf8.parse('abcdefgabcdegf21')
const decrypt = CryptoJS.AES.decrypt(str, key, {
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7
})
const aesStr = CryptoJS.enc.Utf8.stringify(decrypt).toString()
try {
return JSON.parse(aesStr)
} catch (e) {
return aesStr
}
}
\ No newline at end of file
......
......@@ -6,10 +6,9 @@
// const baseUrl_api = "http://22yidpjzjifv.ngrok.xiaomiqiu123.top/stage-api/";
// const baseUrl_api = "http://36.153.235.222:7899/stage-api";
// const baseUrl_api = 'http://192.168.1.132:8787'
// const baseUrl_api = 'https://ztx.itechtop.cn/stage-api'
// const baseUrl_api = 'https://tkcn.19wk.cn:8443/stage-api'
const baseUrl_api = 'https://tkcn.19wk.cn:8443/stage-api'
const baseUrl_api = 'https://system.taekwondo.org.cn/stage-api'
// const baseUrl_api = 'https://system.taekwondo.org.cn/stage-api'
export default {
baseUrl_api
}
......
......@@ -56,7 +56,7 @@
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import _ from 'lodash'
import _ from 'underscore'
import {
onMounted,
ref
......
......@@ -52,7 +52,7 @@
onShow
} from '@dcloudio/uni-app'
import * as api from '@/common/api.js'
import _ from 'lodash'
import _ from 'underscore'
import config from '/config.js'
const query = ref({
pageNum: 1,
......
......@@ -102,7 +102,7 @@
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import _ from 'lodash'
import _ from 'underscore'
import {
onMounted,
ref
......
......@@ -175,7 +175,7 @@
} from '@dcloudio/uni-app';
import config from '@/config.js'
import dayjs from 'dayjs'
import _ from 'lodash'
import _ from 'underscore'
const app = getApp();
const memberInfo = app.globalData.memberInfo
const form = ref({
......
......@@ -106,7 +106,7 @@
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import _ from 'lodash'
import _ from 'underscore'
import {
onMounted,
ref
......
......@@ -60,7 +60,7 @@
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import _ from 'lodash'
import _ from 'underscore'
import {
onMounted,
ref
......
......@@ -41,7 +41,7 @@
import {
onLoad
} from '@dcloudio/uni-app'
import _ from 'lodash'
import _ from 'underscore'
const {
proxy
} = getCurrentInstance()
......
......@@ -56,7 +56,7 @@
import {
onLoad
} from '@dcloudio/uni-app'
import _ from 'lodash'
import _ from 'underscore'
const queryParams = ref({
pageNum: 1,
pageSize: 10
......
......@@ -57,7 +57,7 @@
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import _ from 'lodash'
import _ from 'underscore'
import {
onMounted,
ref
......
......@@ -64,7 +64,7 @@
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import _ from 'lodash'
import _ from 'underscore'
import {
ref
} from 'vue'
......
......@@ -60,7 +60,7 @@
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import _ from 'lodash'
import _ from 'underscore'
import {
onMounted,
ref
......
......@@ -64,7 +64,7 @@
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import _ from 'lodash'
import _ from 'underscore'
import {
onMounted,
ref
......
......@@ -16,7 +16,8 @@
<view class="date">
<uni-icons type="calendar-filled" size="16" color="#AD181F"></uni-icons>
{{item.submitTimeStr}} 提交</view>
{{item.submitTimeStr}} 提交
</view>
<view class="text-primary" v-if="item.payCode" @click="goDetail(item)">{{item.payCode}}</view>
<view class="name mt0 w100" @click="goDetail(item)"><text class="dot"></text>{{item.name}}</view>
<view class="pp esp" v-if="item.certTimeStr">证书发送时间:{{item.certTimeStr}}</view>
......@@ -31,13 +32,14 @@
</view>
</view>
<view class="func" v-if="item.certStatus != '2'">
<button @click="send(item)">一键生成</button>
<!-- v-if="item.certStatus != '2'" -->
<view class="func">
<button @click="send(item)">更新证书</button>
</view>
</view>
</view>
</z-paging>
<!-- <view class="nodata" v-if="infoList.length==0">
<!-- <view class="nodata" v-if="infoList.length==0">
<image mode="aspectFit" src="/static/nodata.png"></image>
<text>暂无数据</text>
</view> -->
......@@ -47,7 +49,7 @@
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import _ from 'lodash'
import _ from 'underscore'
import {
onMounted,
ref
......@@ -72,14 +74,14 @@
const paging = ref(null)
onLoad((option) => {
queryParams.value.type = option.type
if(option.type==2){
if (option.type == 2) {
uni.setNavigationBarTitle({
title:'段位考试详情'
title: '段位考试详情'
})
}
if(option.type==3){
if (option.type == 3) {
uni.setNavigationBarTitle({
title:'越段考试详情'
title: '越段考试详情'
})
}
})
......@@ -100,7 +102,7 @@
getList()
}
function getQuery(pageNum,pageSize){
function getQuery(pageNum, pageSize) {
queryParams.value.pageNum = pageNum,
queryParams.value.pageSize = pageSize
api.getCertsLList(queryParams.value).then(res => {
......@@ -108,6 +110,7 @@
total.value = res.total
})
}
function getList() {
uni.showLoading({
title: '加载中'
......@@ -126,13 +129,31 @@
});
}
function send(row) {
function checkCert(payIds, sureFunc, confirmFunc) {
return api.checkPersonByPayIds(payIds).then(res => {
if (res.data == 1) {
confirmFunc().then((kk)=>{
if(kk.confirm){
sureFunc()
}
})
} else if (res.data == 2 || res.data == 3) {
uni.showModal({
title: '提示',
content: `确定生成 ${row.name} 的证书吗`,
success: function(res) {
if (res.confirm) {
api.submitCert([{
content:`存在学员没有照片,是否继续生成?`,
success: (rr) => {
if(rr.confirm){
sureFunc()
}
}
})
}
})
}
function send(row) {
checkCert(row.payId, () => {
api.submitCert2([{
id: row.payId
}]).then(res => {
uni.showToast({
......@@ -140,8 +161,11 @@
})
getList()
})
}
}
},()=>{
return uni.showModal({
title: '提示',
content:`确定下发 ${row.name} 的证书吗`
})
})
}
</script>
......
......@@ -28,8 +28,9 @@
<view>{{item.totalNum}}/<text class="text-danger">{{item.pass}}</text></view>
</view>
</view>
<view class="func" v-if="item.isCert != '2'">
<button @click="send(item)">一键生成</button>
<!-- v-if="item.isCert != '2'" -->
<view class="func">
<button @click="send(item)">更新证书</button>
</view>
</view>
</view>
......@@ -44,7 +45,7 @@
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import _ from 'lodash'
import _ from 'underscore'
import {
onMounted,
ref
......@@ -114,14 +115,30 @@
url: path
});
}
function send(row) {
function checkCert(examIds,$sureFunc,$confirmFunc){
return api.checkPersonByExamIds(examIds).then(res=>{
if (res.data == 1) {
$confirmFunc().then((kk)=>{
if(kk.confirm){
$sureFunc()
}
})
} else if (res.data == 2 || res.data == 3) {
uni.showModal({
title: '提示',
content: `确定一键下发 ${row.name} 的证书`,
success: function(res) {
if (res.confirm) {
api.submitCert([{
content:`存在学员没有照片,是否继续生成?`,
success: (rr) => {
if(rr.confirm){
$sureFunc()
}
}
})
}
})
}
function send(row) {
checkCert(row.examId,()=>{
api.submitCert2([{
id: queryParams.value.payId,
children: [{
id: row.examId
......@@ -132,8 +149,11 @@
})
getList()
})
}
}
},()=>{
return uni.showModal({
title: '提示',
content:`确定下发 ${row.name} 的证书吗`
})
})
}
</script>
......
......@@ -45,7 +45,9 @@
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import {szToHz} from '@/common/utils.js'
import {
szToHz
} from '@/common/utils.js'
import {
ref,
getCurrentInstance
......@@ -72,7 +74,7 @@
uni.showLoading({
title: '加载中'
})
if(queryParams.value.name==''){
if (queryParams.value.name == '') {
delete queryParams.value.name
}
api.certStudentList(queryParams.value).then(res => {
......@@ -80,14 +82,26 @@
uni.hideLoading()
})
}
function checkCert(row){
return api.checkPersonByPersonId(row.perId).then(res => {
if (!res.data) {
uni.showModal({
title: '提示',
content:'该学员没有照片,无法生成证书!',
success: () => {}
})
return Promise.reject()
}
})
}
function sendCert(row) {
let msg
if(row.isCert==1){
if (row.isCert == 1) {
msg = `更新`
}else{
} else {
msg = `下发`
}
checkCert(row).then(() => {
uni.showModal({
title: '提示',
content: `确定${msg}${row.realName}的证书吗`,
......@@ -101,7 +115,7 @@
}]
}]
api.submitCert(params).then(res => {
api.submitCert2(params).then(res => {
uni.showToast({
title: `下发成功`
})
......@@ -110,6 +124,7 @@
}
}
})
})
}
......
......@@ -117,7 +117,7 @@
import config from '@/config.js'
import * as loginServer from '@/common/login.js';
import _ from 'lodash'
import _ from 'underscore'
import {
ref
} from 'vue'
......
......@@ -97,7 +97,7 @@
ref
} from 'vue';
import * as api from '@/common/api.js';
import _ from 'lodash'
import _ from 'underscore'
import {
onLoad,
onShow
......
......@@ -30,7 +30,7 @@
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import _ from 'lodash'
import _ from 'underscore'
import {
onMounted,
ref
......
......@@ -64,7 +64,7 @@
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import _ from 'lodash'
import _ from 'underscore'
import {
onMounted,
ref
......
{
"dependencies": {
"crypto-js": "^4.1.1",
"dayjs": "^1.11.6",
"lodash": "^4.17.21"
"lodash": "^4.17.21",
"underscore": "^1.13.6"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^22.0.0"
......
......@@ -77,7 +77,7 @@
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import _ from 'lodash'
import _ from 'underscore'
import {
onMounted,
ref
......
......@@ -60,7 +60,7 @@
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import _ from 'lodash'
import _ from 'underscore'
import {
onMounted,
ref
......
......@@ -49,7 +49,7 @@
<script setup>
import * as examApi from '@/common/api_exam.js'
import _ from 'lodash'
import _ from 'underscore'
import {
ref
} from 'vue'
......
......@@ -36,7 +36,7 @@
import {
onLoad
} from '@dcloudio/uni-app';
import _ from 'lodash'
import _ from 'underscore'
import config from '@/config.js'
const form = ref({})
const attachmentFile = ref([])
......
......@@ -103,7 +103,7 @@
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import _ from 'lodash'
import _ from 'underscore'
import {
onMounted,
ref
......
......@@ -50,7 +50,7 @@
<script setup>
import * as examApi from '@/common/api_exam.js'
import _ from 'lodash'
import _ from 'underscore'
import { ref } from 'vue'
import { onLoad,onShow } from '@dcloudio/uni-app'
......
......@@ -50,7 +50,7 @@
<script setup>
import * as examApi from '@/common/api_exam.js'
import _ from 'lodash'
import _ from 'underscore'
import { ref } from 'vue'
import { onLoad,onShow } from '@dcloudio/uni-app'
......
......@@ -56,7 +56,7 @@
<script setup>
import * as examApi from '@/common/api_exam.js'
import _ from 'lodash'
import _ from 'underscore'
import {
ref
} from 'vue'
......
......@@ -129,6 +129,7 @@
onLoad
} from '@dcloudio/uni-app'
import config from '@/config.js'
import * as aes2 from '@/common/utils.js'
const current = ref(0)
const popup = ref(null)
const infoConfirm = ref(null)
......@@ -499,6 +500,11 @@
baseFormData.value.idcType='0'
}
delete baseFormData.value.card
const time = new Date().valueOf() + ''
baseFormData.t = time + Math.floor(Math.random() * 10)
baseFormData.signT = aes2.AESEncrypt(baseFormData.idcType + time)
api.addPersonToMyDept(baseFormData.value).then(Response => {
if (Response.data == 0) {
let msg = '该成员,实名认证未通过,注册失败!'
......
......@@ -41,7 +41,7 @@ import {
onShow
} from '@dcloudio/uni-app'
import * as api from '@/common/api.js'
import _ from 'lodash'
import _ from 'underscore'
import config from '/config.js'
const queryParams = ref({
paymentRangeId:-1,
......
......@@ -23,6 +23,26 @@
</view>
</view>
</view>
<!-- 会员证 -->
<view style="margin: 30rpx 0 0;" v-if="form.certStage!=0&&form.idcType!=3&&form.certStage!=2&&form.certStage!=1">
<view class="zhengBox">
<image v-if="form.certStage == 4" style="width: 600rpx; height: 380rpx;position: relative" :src="config.baseUrl_api+'/fs/static/icon/memberCardU.png'" :fit="fit" />
<image v-else style="width: 600rpx; height: 380rpx;position: relative" :src="config.baseUrl_api+'/fs/static/icon/memberCard.png'" :fit="fit" />
<view class="zhengbody" @contextmenu.prevent="youji">
<image mode="aspectFill" :src="(form.photo)" class="head"/>
<view class="memberNumber">{{ form.perCode }}</view>
<view class="birthday">{{ fileData(form.birth) }}</view>
<view class="phone">010-87188971</view>
<view class="service">https://www.taekwondo.org.cn/</view>
<view class="validity">{{ fileData(form.beginTime) +'-'+fileData(form.validityDate) }}</view>
<view class="nameC">
<view ref="content" class="content">{{ form.name }} </view>
</view>
</view>
</view>
</view>
<uni-list>
<uni-list-item title="姓名" :rightText="form.name" />
<uni-list-item title="证件类型" :rightText="cardType?.[form?.idcType]?.label" />
......@@ -80,6 +100,7 @@
}
])
const form = ref({})
const urlHref = ref()
onLoad((option) => {
console.log(option)
api.getInfo(option.perId).then(res => {
......@@ -109,16 +130,44 @@
}
})
}
function fileData(time) {
if (!time) return
const data = new Date(time.replace(/-/g, '/'))
const year = data.getFullYear()
const month = data.getMonth() + 1
const dates = data.getDate()
return year + '年' + month + '月' + dates + '日'
}
</script>
<style scoped lang="scss">
.flexbox{width: 60%;margin:10rpx auto;font-size: 28rpx;align-items: center;
label{color: #7b7f83;width: 5em;font-size: 24rpx;}
.flexbox {
width: 60%;
margin: 10rpx auto;
font-size: 28rpx;
align-items: center;
label {
color: #7b7f83;
width: 5em;
font-size: 24rpx;
}
}
.topBg {
background: #f5f5f5;
}
.infoBox {
padding: 1rpx 1rpx 30rpx;
.name {
font-size: 34rpx;
text-align: center;
}
.topBg{background: #f5f5f5;}
.infoBox{padding: 1rpx 1rpx 30rpx;
.name{font-size: 34rpx;text-align: center;}
}
.photobox {
position: relative;
padding: 30rpx 0 30rpx;
......@@ -131,11 +180,14 @@
margin: auto;
}
}
.height1 {
height: 1rpx
}
.mainbox {
margin: 30rpx 25rpx 60rpx;box-shadow:0 0 8rpx #ddd;
margin: 30rpx 25rpx 60rpx;
box-shadow: 0 0 8rpx #ddd;
background: #FFFFFF;
border-radius: 15rpx;
......@@ -164,4 +216,62 @@
text-align: center;
border-radius: 50%;
}
.zhengBox{
position: relative;width: 600rpx; height: 380rpx;margin:0 auto 30rpx;
.zhengbody{
.head{width: 114rpx;height: 114rpx;border-radius: 50%;position: absolute;left: 65rpx;top: 132rpx;}
.birthday{
position: absolute; top: 158rpx;left: 434rpx;
font-size: 16rpx;
color: #9f6a44;
}
.memberNumber{
position: absolute;top: 182rpx;left: 290rpx;
font-size: 19rpx;
color: #9f6a44;
font-weight: 600;
letter-spacing: 1px;
}
.phone{
position: absolute; top: 292rpx;left: 340rpx;
font-size: 16rpx;
color: #bc9060;
}
.service{
position: absolute;
top: 313rpx;
left: 340rpx;
font-size: 16rpx;
color: #bc9060;
}
.validity{
position: absolute;
top: 336rpx;
left: 340rpx;
font-size: 16rpx;
color: #bc9060;
}
.nameC{
position: absolute;
top: 146rpx;
left: 240rpx;
color: #9f6a44;
font-weight: 600;
line-height: 1;
}
.content{
width: 120rpx;
box-sizing: border-box;
display: flex;
align-items: center;
//white-space: nowrap;
overflow: hidden;
overflow-x: auto;
transform-origin: 0 55%;
white-space: nowrap;
}
}
}
</style>
\ No newline at end of file
......
......@@ -41,7 +41,7 @@ import {
onShow
} from '@dcloudio/uni-app'
import * as api from '@/common/api.js'
import _ from 'lodash'
import _ from 'underscore'
import config from '/config.js'
const queryParams = ref({
paymentRangeId:-1,
......
......@@ -74,7 +74,7 @@
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import _ from 'lodash'
import _ from 'underscore'
import {
onMounted,
ref
......
......@@ -71,7 +71,7 @@
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import _ from 'lodash'
import _ from 'underscore'
import { ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
const app = getApp();
......
......@@ -59,7 +59,7 @@
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import _ from 'lodash'
import _ from 'underscore'
import {
onMounted,
ref
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!