2f7e2ea6 by 杨炀

no message

1 parent 937f2316
1 import request from './request.js' 1 import request from './request.js'
2 import config from '@/config.js' 2 import config from '@/config.js'
3 import * as loginServer from '@/common/login.js'; 3 import * as loginServer from '@/common/login.js';
4 import _ from 'lodash'
5 4
6 // 激活 5 // 激活
7 export function active(data) { 6 export function active(data) {
...@@ -130,13 +129,13 @@ export function deptTreeSelect(params) { ...@@ -130,13 +129,13 @@ export function deptTreeSelect(params) {
130 }) 129 })
131 } 130 }
132 const setIdToString = (list) => { 131 const setIdToString = (list) => {
133 _.each(list, (l) => { 132 for (var l of list) {
134 l.id += '' 133 l.id += ''
135 l.parentId += '' 134 l.parentId += ''
136 if (l.children && l.children.length > 0) { 135 if (l.children && l.children.length > 0) {
137 setIdToString(l.children) 136 setIdToString(l.children)
138 } 137 }
139 }) 138 }
140 } 139 }
141 140
142 // 会员认证 141 // 会员认证
...@@ -806,7 +805,13 @@ export function submitCert(data) { ...@@ -806,7 +805,13 @@ export function submitCert(data) {
806 params: data 805 params: data
807 }) 806 })
808 } 807 }
809 808 export function submitCert2(data) {
809 return request({
810 url: `/exam/payment/submitCerts/updateCerts`,
811 method: 'put',
812 params: data
813 })
814 }
810 export function getCertsLList(query) { 815 export function getCertsLList(query) {
811 return request({ 816 return request({
812 url: '/exam/payment/certsList', 817 url: '/exam/payment/certsList',
...@@ -1226,3 +1231,21 @@ export function queryProcess(id) { ...@@ -1226,3 +1231,21 @@ export function queryProcess(id) {
1226 method: 'get' 1231 method: 'get'
1227 }) 1232 })
1228 } 1233 }
1234 export function checkPersonByPayIds(payIds) {
1235 return request({
1236 url: `/exam/person/checkPersonByPayIds/${payIds}`,
1237 method: 'get'
1238 })
1239 }
1240 export function checkPersonByExamIds(examIds) {
1241 return request({
1242 url: `/exam/person/checkPersonByExamIds/${examIds}`,
1243 method: 'get'
1244 })
1245 }
1246 export function checkPersonByPersonId(perId) {
1247 return request({
1248 url: `/exam/person/checkPersonByPersonId/${perId}`,
1249 method: 'get'
1250 })
1251 }
...\ No newline at end of file ...\ No newline at end of file
......
1 import config from '@/config.js' 1 import config from '@/config.js'
2 import _ from 'lodash' 2 import _ from 'underscore'
3 3
4 const excludeUrls = ['getMemberCountInfo', 'getInfo'] 4 const excludeUrls = ['getMemberCountInfo', 'getInfo']
5 5
......
1 import CryptoJS from 'crypto-js'
1 export function szToHz(num) { 2 export function szToHz(num) {
2 const hzArr = ['〇', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十'] 3 const hzArr = ['〇', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十']
3 return hzArr[parseInt(num)] 4 return hzArr[parseInt(num)]
4 } 5 }
6
7 export function AESEncrypt(data) {
8 const key = CryptoJS.enc.Utf8.parse('abcdefgabcdegf21')
9 // 将数据转换为字符串
10 const parseByte2HexStr = (wordArray) => {
11 const hexStr = wordArray.ciphertext.toString(CryptoJS.enc.Hex)
12 return hexStr
13 }
14 let dataStr
15 if (typeof data === 'object') {
16 dataStr = JSON.stringify(data)
17 } else {
18 dataStr = String(data)
19 }
20 // 加密
21 const encrypted = CryptoJS.AES.encrypt(CryptoJS.enc.Utf8.parse(dataStr), key, {
22 mode: CryptoJS.mode.ECB,
23 padding: CryptoJS.pad.Pkcs7
24 })
25 return parseByte2HexStr(encrypted)
26 }
27
28
29 export function AESDecrypt(str) {
30 const key = CryptoJS.enc.Utf8.parse('abcdefgabcdegf21')
31 const decrypt = CryptoJS.AES.decrypt(str, key, {
32 mode: CryptoJS.mode.ECB,
33 padding: CryptoJS.pad.Pkcs7
34 })
35 const aesStr = CryptoJS.enc.Utf8.stringify(decrypt).toString()
36 try {
37 return JSON.parse(aesStr)
38 } catch (e) {
39 return aesStr
40 }
41 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -6,10 +6,9 @@ ...@@ -6,10 +6,9 @@
6 // const baseUrl_api = "http://22yidpjzjifv.ngrok.xiaomiqiu123.top/stage-api/"; 6 // const baseUrl_api = "http://22yidpjzjifv.ngrok.xiaomiqiu123.top/stage-api/";
7 // const baseUrl_api = "http://36.153.235.222:7899/stage-api"; 7 // const baseUrl_api = "http://36.153.235.222:7899/stage-api";
8 // const baseUrl_api = 'http://192.168.1.132:8787' 8 // const baseUrl_api = 'http://192.168.1.132:8787'
9 // const baseUrl_api = 'https://ztx.itechtop.cn/stage-api' 9 const baseUrl_api = 'https://tkcn.19wk.cn:8443/stage-api'
10 // const baseUrl_api = 'https://tkcn.19wk.cn:8443/stage-api'
11 10
12 const baseUrl_api = 'https://system.taekwondo.org.cn/stage-api' 11 // const baseUrl_api = 'https://system.taekwondo.org.cn/stage-api'
13 export default { 12 export default {
14 baseUrl_api 13 baseUrl_api
15 } 14 }
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
56 <script setup> 56 <script setup>
57 import * as api from '@/common/api.js' 57 import * as api from '@/common/api.js'
58 import config from '@/config.js' 58 import config from '@/config.js'
59 import _ from 'lodash' 59 import _ from 'underscore'
60 import { 60 import {
61 onMounted, 61 onMounted,
62 ref 62 ref
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
52 onShow 52 onShow
53 } from '@dcloudio/uni-app' 53 } from '@dcloudio/uni-app'
54 import * as api from '@/common/api.js' 54 import * as api from '@/common/api.js'
55 import _ from 'lodash' 55 import _ from 'underscore'
56 import config from '/config.js' 56 import config from '/config.js'
57 const query = ref({ 57 const query = ref({
58 pageNum: 1, 58 pageNum: 1,
......
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
102 <script setup> 102 <script setup>
103 import * as api from '@/common/api.js' 103 import * as api from '@/common/api.js'
104 import config from '@/config.js' 104 import config from '@/config.js'
105 import _ from 'lodash' 105 import _ from 'underscore'
106 import { 106 import {
107 onMounted, 107 onMounted,
108 ref 108 ref
......
...@@ -175,7 +175,7 @@ ...@@ -175,7 +175,7 @@
175 } from '@dcloudio/uni-app'; 175 } from '@dcloudio/uni-app';
176 import config from '@/config.js' 176 import config from '@/config.js'
177 import dayjs from 'dayjs' 177 import dayjs from 'dayjs'
178 import _ from 'lodash' 178 import _ from 'underscore'
179 const app = getApp(); 179 const app = getApp();
180 const memberInfo = app.globalData.memberInfo 180 const memberInfo = app.globalData.memberInfo
181 const form = ref({ 181 const form = ref({
......
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
106 <script setup> 106 <script setup>
107 import * as api from '@/common/api.js' 107 import * as api from '@/common/api.js'
108 import config from '@/config.js' 108 import config from '@/config.js'
109 import _ from 'lodash' 109 import _ from 'underscore'
110 import { 110 import {
111 onMounted, 111 onMounted,
112 ref 112 ref
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
60 <script setup> 60 <script setup>
61 import * as api from '@/common/api.js' 61 import * as api from '@/common/api.js'
62 import config from '@/config.js' 62 import config from '@/config.js'
63 import _ from 'lodash' 63 import _ from 'underscore'
64 import { 64 import {
65 onMounted, 65 onMounted,
66 ref 66 ref
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
41 import { 41 import {
42 onLoad 42 onLoad
43 } from '@dcloudio/uni-app' 43 } from '@dcloudio/uni-app'
44 import _ from 'lodash' 44 import _ from 'underscore'
45 const { 45 const {
46 proxy 46 proxy
47 } = getCurrentInstance() 47 } = getCurrentInstance()
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
56 import { 56 import {
57 onLoad 57 onLoad
58 } from '@dcloudio/uni-app' 58 } from '@dcloudio/uni-app'
59 import _ from 'lodash' 59 import _ from 'underscore'
60 const queryParams = ref({ 60 const queryParams = ref({
61 pageNum: 1, 61 pageNum: 1,
62 pageSize: 10 62 pageSize: 10
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
57 <script setup> 57 <script setup>
58 import * as api from '@/common/api.js' 58 import * as api from '@/common/api.js'
59 import config from '@/config.js' 59 import config from '@/config.js'
60 import _ from 'lodash' 60 import _ from 'underscore'
61 import { 61 import {
62 onMounted, 62 onMounted,
63 ref 63 ref
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
64 <script setup> 64 <script setup>
65 import * as api from '@/common/api.js' 65 import * as api from '@/common/api.js'
66 import config from '@/config.js' 66 import config from '@/config.js'
67 import _ from 'lodash' 67 import _ from 'underscore'
68 import { 68 import {
69 ref 69 ref
70 } from 'vue' 70 } from 'vue'
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
60 <script setup> 60 <script setup>
61 import * as api from '@/common/api.js' 61 import * as api from '@/common/api.js'
62 import config from '@/config.js' 62 import config from '@/config.js'
63 import _ from 'lodash' 63 import _ from 'underscore'
64 import { 64 import {
65 onMounted, 65 onMounted,
66 ref 66 ref
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
64 <script setup> 64 <script setup>
65 import * as api from '@/common/api.js' 65 import * as api from '@/common/api.js'
66 import config from '@/config.js' 66 import config from '@/config.js'
67 import _ from 'lodash' 67 import _ from 'underscore'
68 import { 68 import {
69 onMounted, 69 onMounted,
70 ref 70 ref
......
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
16 16
17 <view class="date"> 17 <view class="date">
18 <uni-icons type="calendar-filled" size="16" color="#AD181F"></uni-icons> 18 <uni-icons type="calendar-filled" size="16" color="#AD181F"></uni-icons>
19 {{item.submitTimeStr}} 提交</view> 19 {{item.submitTimeStr}} 提交
20 </view>
20 <view class="text-primary" v-if="item.payCode" @click="goDetail(item)">{{item.payCode}}</view> 21 <view class="text-primary" v-if="item.payCode" @click="goDetail(item)">{{item.payCode}}</view>
21 <view class="name mt0 w100" @click="goDetail(item)"><text class="dot"></text>{{item.name}}</view> 22 <view class="name mt0 w100" @click="goDetail(item)"><text class="dot"></text>{{item.name}}</view>
22 <view class="pp esp" v-if="item.certTimeStr">证书发送时间:{{item.certTimeStr}}</view> 23 <view class="pp esp" v-if="item.certTimeStr">证书发送时间:{{item.certTimeStr}}</view>
...@@ -31,13 +32,14 @@ ...@@ -31,13 +32,14 @@
31 </view> 32 </view>
32 33
33 </view> 34 </view>
34 <view class="func" v-if="item.certStatus != '2'"> 35 <!-- v-if="item.certStatus != '2'" -->
35 <button @click="send(item)">一键生成</button> 36 <view class="func">
37 <button @click="send(item)">更新证书</button>
36 </view> 38 </view>
37 </view> 39 </view>
38 </view> 40 </view>
39 </z-paging> 41 </z-paging>
40 <!-- <view class="nodata" v-if="infoList.length==0"> 42 <!-- <view class="nodata" v-if="infoList.length==0">
41 <image mode="aspectFit" src="/static/nodata.png"></image> 43 <image mode="aspectFit" src="/static/nodata.png"></image>
42 <text>暂无数据</text> 44 <text>暂无数据</text>
43 </view> --> 45 </view> -->
...@@ -47,7 +49,7 @@ ...@@ -47,7 +49,7 @@
47 <script setup> 49 <script setup>
48 import * as api from '@/common/api.js' 50 import * as api from '@/common/api.js'
49 import config from '@/config.js' 51 import config from '@/config.js'
50 import _ from 'lodash' 52 import _ from 'underscore'
51 import { 53 import {
52 onMounted, 54 onMounted,
53 ref 55 ref
...@@ -72,14 +74,14 @@ ...@@ -72,14 +74,14 @@
72 const paging = ref(null) 74 const paging = ref(null)
73 onLoad((option) => { 75 onLoad((option) => {
74 queryParams.value.type = option.type 76 queryParams.value.type = option.type
75 if(option.type==2){ 77 if (option.type == 2) {
76 uni.setNavigationBarTitle({ 78 uni.setNavigationBarTitle({
77 title:'段位考试详情' 79 title: '段位考试详情'
78 }) 80 })
79 } 81 }
80 if(option.type==3){ 82 if (option.type == 3) {
81 uni.setNavigationBarTitle({ 83 uni.setNavigationBarTitle({
82 title:'越段考试详情' 84 title: '越段考试详情'
83 }) 85 })
84 } 86 }
85 }) 87 })
...@@ -100,7 +102,7 @@ ...@@ -100,7 +102,7 @@
100 getList() 102 getList()
101 } 103 }
102 104
103 function getQuery(pageNum,pageSize){ 105 function getQuery(pageNum, pageSize) {
104 queryParams.value.pageNum = pageNum, 106 queryParams.value.pageNum = pageNum,
105 queryParams.value.pageSize = pageSize 107 queryParams.value.pageSize = pageSize
106 api.getCertsLList(queryParams.value).then(res => { 108 api.getCertsLList(queryParams.value).then(res => {
...@@ -108,6 +110,7 @@ ...@@ -108,6 +110,7 @@
108 total.value = res.total 110 total.value = res.total
109 }) 111 })
110 } 112 }
113
111 function getList() { 114 function getList() {
112 uni.showLoading({ 115 uni.showLoading({
113 title: '加载中' 116 title: '加载中'
...@@ -126,13 +129,31 @@ ...@@ -126,13 +129,31 @@
126 }); 129 });
127 } 130 }
128 131
129 function send(row) { 132 function checkCert(payIds, sureFunc, confirmFunc) {
133 return api.checkPersonByPayIds(payIds).then(res => {
134 if (res.data == 1) {
135 confirmFunc().then((kk)=>{
136 if(kk.confirm){
137 sureFunc()
138 }
139 })
140 } else if (res.data == 2 || res.data == 3) {
130 uni.showModal({ 141 uni.showModal({
131 title: '提示', 142 title: '提示',
132 content: `确定生成 ${row.name} 的证书吗`, 143 content:`存在学员没有照片,是否继续生成?`,
133 success: function(res) { 144 success: (rr) => {
134 if (res.confirm) { 145 if(rr.confirm){
135 api.submitCert([{ 146 sureFunc()
147 }
148 }
149 })
150 }
151 })
152 }
153
154 function send(row) {
155 checkCert(row.payId, () => {
156 api.submitCert2([{
136 id: row.payId 157 id: row.payId
137 }]).then(res => { 158 }]).then(res => {
138 uni.showToast({ 159 uni.showToast({
...@@ -140,8 +161,11 @@ ...@@ -140,8 +161,11 @@
140 }) 161 })
141 getList() 162 getList()
142 }) 163 })
143 } 164 },()=>{
144 } 165 return uni.showModal({
166 title: '提示',
167 content:`确定下发 ${row.name} 的证书吗`
168 })
145 }) 169 })
146 } 170 }
147 </script> 171 </script>
......
...@@ -28,8 +28,9 @@ ...@@ -28,8 +28,9 @@
28 <view>{{item.totalNum}}/<text class="text-danger">{{item.pass}}</text></view> 28 <view>{{item.totalNum}}/<text class="text-danger">{{item.pass}}</text></view>
29 </view> 29 </view>
30 </view> 30 </view>
31 <view class="func" v-if="item.isCert != '2'"> 31 <!-- v-if="item.isCert != '2'" -->
32 <button @click="send(item)">一键生成</button> 32 <view class="func">
33 <button @click="send(item)">更新证书</button>
33 </view> 34 </view>
34 </view> 35 </view>
35 </view> 36 </view>
...@@ -44,7 +45,7 @@ ...@@ -44,7 +45,7 @@
44 <script setup> 45 <script setup>
45 import * as api from '@/common/api.js' 46 import * as api from '@/common/api.js'
46 import config from '@/config.js' 47 import config from '@/config.js'
47 import _ from 'lodash' 48 import _ from 'underscore'
48 import { 49 import {
49 onMounted, 50 onMounted,
50 ref 51 ref
...@@ -114,14 +115,30 @@ ...@@ -114,14 +115,30 @@
114 url: path 115 url: path
115 }); 116 });
116 } 117 }
117 118 function checkCert(examIds,$sureFunc,$confirmFunc){
118 function send(row) { 119 return api.checkPersonByExamIds(examIds).then(res=>{
120 if (res.data == 1) {
121 $confirmFunc().then((kk)=>{
122 if(kk.confirm){
123 $sureFunc()
124 }
125 })
126 } else if (res.data == 2 || res.data == 3) {
119 uni.showModal({ 127 uni.showModal({
120 title: '提示', 128 title: '提示',
121 content: `确定一键下发 ${row.name} 的证书`, 129 content:`存在学员没有照片,是否继续生成?`,
122 success: function(res) { 130 success: (rr) => {
123 if (res.confirm) { 131 if(rr.confirm){
124 api.submitCert([{ 132 $sureFunc()
133 }
134 }
135 })
136 }
137 })
138 }
139 function send(row) {
140 checkCert(row.examId,()=>{
141 api.submitCert2([{
125 id: queryParams.value.payId, 142 id: queryParams.value.payId,
126 children: [{ 143 children: [{
127 id: row.examId 144 id: row.examId
...@@ -132,8 +149,11 @@ ...@@ -132,8 +149,11 @@
132 }) 149 })
133 getList() 150 getList()
134 }) 151 })
135 } 152 },()=>{
136 } 153 return uni.showModal({
154 title: '提示',
155 content:`确定下发 ${row.name} 的证书吗`
156 })
137 }) 157 })
138 } 158 }
139 </script> 159 </script>
......
...@@ -45,7 +45,9 @@ ...@@ -45,7 +45,9 @@
45 <script setup> 45 <script setup>
46 import * as api from '@/common/api.js' 46 import * as api from '@/common/api.js'
47 import config from '@/config.js' 47 import config from '@/config.js'
48 import {szToHz} from '@/common/utils.js' 48 import {
49 szToHz
50 } from '@/common/utils.js'
49 import { 51 import {
50 ref, 52 ref,
51 getCurrentInstance 53 getCurrentInstance
...@@ -72,7 +74,7 @@ ...@@ -72,7 +74,7 @@
72 uni.showLoading({ 74 uni.showLoading({
73 title: '加载中' 75 title: '加载中'
74 }) 76 })
75 if(queryParams.value.name==''){ 77 if (queryParams.value.name == '') {
76 delete queryParams.value.name 78 delete queryParams.value.name
77 } 79 }
78 api.certStudentList(queryParams.value).then(res => { 80 api.certStudentList(queryParams.value).then(res => {
...@@ -80,14 +82,26 @@ ...@@ -80,14 +82,26 @@
80 uni.hideLoading() 82 uni.hideLoading()
81 }) 83 })
82 } 84 }
83 85 function checkCert(row){
86 return api.checkPersonByPersonId(row.perId).then(res => {
87 if (!res.data) {
88 uni.showModal({
89 title: '提示',
90 content:'该学员没有照片,无法生成证书!',
91 success: () => {}
92 })
93 return Promise.reject()
94 }
95 })
96 }
84 function sendCert(row) { 97 function sendCert(row) {
85 let msg 98 let msg
86 if(row.isCert==1){ 99 if (row.isCert == 1) {
87 msg = `更新` 100 msg = `更新`
88 }else{ 101 } else {
89 msg = `下发` 102 msg = `下发`
90 } 103 }
104 checkCert(row).then(() => {
91 uni.showModal({ 105 uni.showModal({
92 title: '提示', 106 title: '提示',
93 content: `确定${msg}${row.realName}的证书吗`, 107 content: `确定${msg}${row.realName}的证书吗`,
...@@ -101,7 +115,7 @@ ...@@ -101,7 +115,7 @@
101 }] 115 }]
102 }] 116 }]
103 117
104 api.submitCert(params).then(res => { 118 api.submitCert2(params).then(res => {
105 uni.showToast({ 119 uni.showToast({
106 title: `下发成功` 120 title: `下发成功`
107 }) 121 })
...@@ -110,6 +124,7 @@ ...@@ -110,6 +124,7 @@
110 } 124 }
111 } 125 }
112 }) 126 })
127 })
113 } 128 }
114 129
115 130
......
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
117 import config from '@/config.js' 117 import config from '@/config.js'
118 import * as loginServer from '@/common/login.js'; 118 import * as loginServer from '@/common/login.js';
119 119
120 import _ from 'lodash' 120 import _ from 'underscore'
121 import { 121 import {
122 ref 122 ref
123 } from 'vue' 123 } from 'vue'
......
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
97 ref 97 ref
98 } from 'vue'; 98 } from 'vue';
99 import * as api from '@/common/api.js'; 99 import * as api from '@/common/api.js';
100 import _ from 'lodash' 100 import _ from 'underscore'
101 import { 101 import {
102 onLoad, 102 onLoad,
103 onShow 103 onShow
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
30 <script setup> 30 <script setup>
31 import * as api from '@/common/api.js' 31 import * as api from '@/common/api.js'
32 import config from '@/config.js' 32 import config from '@/config.js'
33 import _ from 'lodash' 33 import _ from 'underscore'
34 import { 34 import {
35 onMounted, 35 onMounted,
36 ref 36 ref
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
64 <script setup> 64 <script setup>
65 import * as api from '@/common/api.js' 65 import * as api from '@/common/api.js'
66 import config from '@/config.js' 66 import config from '@/config.js'
67 import _ from 'lodash' 67 import _ from 'underscore'
68 import { 68 import {
69 onMounted, 69 onMounted,
70 ref 70 ref
......
1 { 1 {
2 "dependencies": { 2 "dependencies": {
3 "crypto-js": "^4.1.1",
3 "dayjs": "^1.11.6", 4 "dayjs": "^1.11.6",
4 "lodash": "^4.17.21" 5 "lodash": "^4.17.21",
6 "underscore": "^1.13.6"
5 }, 7 },
6 "devDependencies": { 8 "devDependencies": {
7 "@rollup/plugin-commonjs": "^22.0.0" 9 "@rollup/plugin-commonjs": "^22.0.0"
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
77 <script setup> 77 <script setup>
78 import * as api from '@/common/api.js' 78 import * as api from '@/common/api.js'
79 import config from '@/config.js' 79 import config from '@/config.js'
80 import _ from 'lodash' 80 import _ from 'underscore'
81 import { 81 import {
82 onMounted, 82 onMounted,
83 ref 83 ref
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
60 <script setup> 60 <script setup>
61 import * as api from '@/common/api.js' 61 import * as api from '@/common/api.js'
62 import config from '@/config.js' 62 import config from '@/config.js'
63 import _ from 'lodash' 63 import _ from 'underscore'
64 import { 64 import {
65 onMounted, 65 onMounted,
66 ref 66 ref
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
49 49
50 <script setup> 50 <script setup>
51 import * as examApi from '@/common/api_exam.js' 51 import * as examApi from '@/common/api_exam.js'
52 import _ from 'lodash' 52 import _ from 'underscore'
53 import { 53 import {
54 ref 54 ref
55 } from 'vue' 55 } from 'vue'
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
36 import { 36 import {
37 onLoad 37 onLoad
38 } from '@dcloudio/uni-app'; 38 } from '@dcloudio/uni-app';
39 import _ from 'lodash' 39 import _ from 'underscore'
40 import config from '@/config.js' 40 import config from '@/config.js'
41 const form = ref({}) 41 const form = ref({})
42 const attachmentFile = ref([]) 42 const attachmentFile = ref([])
......
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
103 <script setup> 103 <script setup>
104 import * as api from '@/common/api.js' 104 import * as api from '@/common/api.js'
105 import config from '@/config.js' 105 import config from '@/config.js'
106 import _ from 'lodash' 106 import _ from 'underscore'
107 import { 107 import {
108 onMounted, 108 onMounted,
109 ref 109 ref
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
50 50
51 <script setup> 51 <script setup>
52 import * as examApi from '@/common/api_exam.js' 52 import * as examApi from '@/common/api_exam.js'
53 import _ from 'lodash' 53 import _ from 'underscore'
54 import { ref } from 'vue' 54 import { ref } from 'vue'
55 import { onLoad,onShow } from '@dcloudio/uni-app' 55 import { onLoad,onShow } from '@dcloudio/uni-app'
56 56
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
50 50
51 <script setup> 51 <script setup>
52 import * as examApi from '@/common/api_exam.js' 52 import * as examApi from '@/common/api_exam.js'
53 import _ from 'lodash' 53 import _ from 'underscore'
54 import { ref } from 'vue' 54 import { ref } from 'vue'
55 import { onLoad,onShow } from '@dcloudio/uni-app' 55 import { onLoad,onShow } from '@dcloudio/uni-app'
56 56
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
56 56
57 <script setup> 57 <script setup>
58 import * as examApi from '@/common/api_exam.js' 58 import * as examApi from '@/common/api_exam.js'
59 import _ from 'lodash' 59 import _ from 'underscore'
60 import { 60 import {
61 ref 61 ref
62 } from 'vue' 62 } from 'vue'
......
...@@ -129,6 +129,7 @@ ...@@ -129,6 +129,7 @@
129 onLoad 129 onLoad
130 } from '@dcloudio/uni-app' 130 } from '@dcloudio/uni-app'
131 import config from '@/config.js' 131 import config from '@/config.js'
132 import * as aes2 from '@/common/utils.js'
132 const current = ref(0) 133 const current = ref(0)
133 const popup = ref(null) 134 const popup = ref(null)
134 const infoConfirm = ref(null) 135 const infoConfirm = ref(null)
...@@ -499,6 +500,11 @@ ...@@ -499,6 +500,11 @@
499 baseFormData.value.idcType='0' 500 baseFormData.value.idcType='0'
500 } 501 }
501 delete baseFormData.value.card 502 delete baseFormData.value.card
503
504 const time = new Date().valueOf() + ''
505 baseFormData.t = time + Math.floor(Math.random() * 10)
506 baseFormData.signT = aes2.AESEncrypt(baseFormData.idcType + time)
507
502 api.addPersonToMyDept(baseFormData.value).then(Response => { 508 api.addPersonToMyDept(baseFormData.value).then(Response => {
503 if (Response.data == 0) { 509 if (Response.data == 0) {
504 let msg = '该成员,实名认证未通过,注册失败!' 510 let msg = '该成员,实名认证未通过,注册失败!'
......
...@@ -41,7 +41,7 @@ import { ...@@ -41,7 +41,7 @@ import {
41 onShow 41 onShow
42 } from '@dcloudio/uni-app' 42 } from '@dcloudio/uni-app'
43 import * as api from '@/common/api.js' 43 import * as api from '@/common/api.js'
44 import _ from 'lodash' 44 import _ from 'underscore'
45 import config from '/config.js' 45 import config from '/config.js'
46 const queryParams = ref({ 46 const queryParams = ref({
47 paymentRangeId:-1, 47 paymentRangeId:-1,
......
...@@ -23,6 +23,26 @@ ...@@ -23,6 +23,26 @@
23 </view> 23 </view>
24 </view> 24 </view>
25 </view> 25 </view>
26
27 <!-- 会员证 -->
28 <view style="margin: 30rpx 0 0;" v-if="form.certStage!=0&&form.idcType!=3&&form.certStage!=2&&form.certStage!=1">
29 <view class="zhengBox">
30 <image v-if="form.certStage == 4" style="width: 600rpx; height: 380rpx;position: relative" :src="config.baseUrl_api+'/fs/static/icon/memberCardU.png'" :fit="fit" />
31 <image v-else style="width: 600rpx; height: 380rpx;position: relative" :src="config.baseUrl_api+'/fs/static/icon/memberCard.png'" :fit="fit" />
32 <view class="zhengbody" @contextmenu.prevent="youji">
33 <image mode="aspectFill" :src="(form.photo)" class="head"/>
34 <view class="memberNumber">{{ form.perCode }}</view>
35 <view class="birthday">{{ fileData(form.birth) }}</view>
36 <view class="phone">010-87188971</view>
37 <view class="service">https://www.taekwondo.org.cn/</view>
38 <view class="validity">{{ fileData(form.beginTime) +'-'+fileData(form.validityDate) }}</view>
39 <view class="nameC">
40 <view ref="content" class="content">{{ form.name }} </view>
41 </view>
42 </view>
43 </view>
44 </view>
45
26 <uni-list> 46 <uni-list>
27 <uni-list-item title="姓名" :rightText="form.name" /> 47 <uni-list-item title="姓名" :rightText="form.name" />
28 <uni-list-item title="证件类型" :rightText="cardType?.[form?.idcType]?.label" /> 48 <uni-list-item title="证件类型" :rightText="cardType?.[form?.idcType]?.label" />
...@@ -80,6 +100,7 @@ ...@@ -80,6 +100,7 @@
80 } 100 }
81 ]) 101 ])
82 const form = ref({}) 102 const form = ref({})
103 const urlHref = ref()
83 onLoad((option) => { 104 onLoad((option) => {
84 console.log(option) 105 console.log(option)
85 api.getInfo(option.perId).then(res => { 106 api.getInfo(option.perId).then(res => {
...@@ -109,16 +130,44 @@ ...@@ -109,16 +130,44 @@
109 } 130 }
110 }) 131 })
111 } 132 }
133 function fileData(time) {
134 if (!time) return
135 const data = new Date(time.replace(/-/g, '/'))
136 const year = data.getFullYear()
137 const month = data.getMonth() + 1
138 const dates = data.getDate()
139 return year + '年' + month + '月' + dates + '日'
140 }
141
112 </script> 142 </script>
113 143
114 <style scoped lang="scss"> 144 <style scoped lang="scss">
115 .flexbox{width: 60%;margin:10rpx auto;font-size: 28rpx;align-items: center; 145 .flexbox {
116 label{color: #7b7f83;width: 5em;font-size: 24rpx;} 146 width: 60%;
147 margin: 10rpx auto;
148 font-size: 28rpx;
149 align-items: center;
150
151 label {
152 color: #7b7f83;
153 width: 5em;
154 font-size: 24rpx;
155 }
156 }
157
158 .topBg {
159 background: #f5f5f5;
160 }
161
162 .infoBox {
163 padding: 1rpx 1rpx 30rpx;
164
165 .name {
166 font-size: 34rpx;
167 text-align: center;
117 } 168 }
118 .topBg{background: #f5f5f5;}
119 .infoBox{padding: 1rpx 1rpx 30rpx;
120 .name{font-size: 34rpx;text-align: center;}
121 } 169 }
170
122 .photobox { 171 .photobox {
123 position: relative; 172 position: relative;
124 padding: 30rpx 0 30rpx; 173 padding: 30rpx 0 30rpx;
...@@ -131,11 +180,14 @@ ...@@ -131,11 +180,14 @@
131 margin: auto; 180 margin: auto;
132 } 181 }
133 } 182 }
183
134 .height1 { 184 .height1 {
135 height: 1rpx 185 height: 1rpx
136 } 186 }
187
137 .mainbox { 188 .mainbox {
138 margin: 30rpx 25rpx 60rpx;box-shadow:0 0 8rpx #ddd; 189 margin: 30rpx 25rpx 60rpx;
190 box-shadow: 0 0 8rpx #ddd;
139 background: #FFFFFF; 191 background: #FFFFFF;
140 border-radius: 15rpx; 192 border-radius: 15rpx;
141 193
...@@ -164,4 +216,62 @@ ...@@ -164,4 +216,62 @@
164 text-align: center; 216 text-align: center;
165 border-radius: 50%; 217 border-radius: 50%;
166 } 218 }
219 .zhengBox{
220 position: relative;width: 600rpx; height: 380rpx;margin:0 auto 30rpx;
221 .zhengbody{
222 .head{width: 114rpx;height: 114rpx;border-radius: 50%;position: absolute;left: 65rpx;top: 132rpx;}
223 .birthday{
224 position: absolute; top: 158rpx;left: 434rpx;
225 font-size: 16rpx;
226 color: #9f6a44;
227 }
228 .memberNumber{
229 position: absolute;top: 182rpx;left: 290rpx;
230 font-size: 19rpx;
231 color: #9f6a44;
232 font-weight: 600;
233 letter-spacing: 1px;
234 }
235 .phone{
236 position: absolute; top: 292rpx;left: 340rpx;
237 font-size: 16rpx;
238 color: #bc9060;
239 }
240 .service{
241 position: absolute;
242 top: 313rpx;
243 left: 340rpx;
244 font-size: 16rpx;
245 color: #bc9060;
246
247 }
248 .validity{
249 position: absolute;
250 top: 336rpx;
251 left: 340rpx;
252 font-size: 16rpx;
253 color: #bc9060;
254
255 }
256 .nameC{
257 position: absolute;
258 top: 146rpx;
259 left: 240rpx;
260 color: #9f6a44;
261 font-weight: 600;
262 line-height: 1;
263 }
264 .content{
265 width: 120rpx;
266 box-sizing: border-box;
267 display: flex;
268 align-items: center;
269 //white-space: nowrap;
270 overflow: hidden;
271 overflow-x: auto;
272 transform-origin: 0 55%;
273 white-space: nowrap;
274 }
275 }
276 }
167 </style> 277 </style>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -41,7 +41,7 @@ import { ...@@ -41,7 +41,7 @@ import {
41 onShow 41 onShow
42 } from '@dcloudio/uni-app' 42 } from '@dcloudio/uni-app'
43 import * as api from '@/common/api.js' 43 import * as api from '@/common/api.js'
44 import _ from 'lodash' 44 import _ from 'underscore'
45 import config from '/config.js' 45 import config from '/config.js'
46 const queryParams = ref({ 46 const queryParams = ref({
47 paymentRangeId:-1, 47 paymentRangeId:-1,
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
74 <script setup> 74 <script setup>
75 import * as api from '@/common/api.js' 75 import * as api from '@/common/api.js'
76 import config from '@/config.js' 76 import config from '@/config.js'
77 import _ from 'lodash' 77 import _ from 'underscore'
78 import { 78 import {
79 onMounted, 79 onMounted,
80 ref 80 ref
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
71 <script setup> 71 <script setup>
72 import * as api from '@/common/api.js' 72 import * as api from '@/common/api.js'
73 import config from '@/config.js' 73 import config from '@/config.js'
74 import _ from 'lodash' 74 import _ from 'underscore'
75 import { ref } from 'vue' 75 import { ref } from 'vue'
76 import { onLoad } from '@dcloudio/uni-app' 76 import { onLoad } from '@dcloudio/uni-app'
77 const app = getApp(); 77 const app = getApp();
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
59 <script setup> 59 <script setup>
60 import * as api from '@/common/api.js' 60 import * as api from '@/common/api.js'
61 import config from '@/config.js' 61 import config from '@/config.js'
62 import _ from 'lodash' 62 import _ from 'underscore'
63 import { 63 import {
64 onMounted, 64 onMounted,
65 ref 65 ref
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!