新增扫码报名和课程管理

main
hcj 4 months ago
parent 0d30235861
commit 84379210be
  1. 18
      pages.json
  2. 922
      pages/index/index.vue
  3. 3399
      pages/index/testtraining/testtraining.vue
  4. 151
      pages/personal/courseSign/courseSign.vue
  5. BIN
      pages/personal/courseSign/error.1png
  6. BIN
      pages/personal/courseSign/error.png
  7. BIN
      pages/personal/courseSign/signSuc.1png
  8. BIN
      pages/personal/courseSign/signSuc.png
  9. 115
      pages/personal/myCourse/myCourse.vue
  10. 7
      pages/personal/personal.vue
  11. 4
      pages/personal/personalresume/personalresume.vue
  12. 12
      pages/personal/setup/peixunban.vue
  13. 16
      utils/encodeChinese.js
  14. 2
      utils/http.js

@ -6,7 +6,7 @@
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"navigationBarTitleText": "首页", "navigationBarTitleText": "首页",
"navigationBarBackgroundColor": "#284CD1" "navigationStyle": "custom"
} }
}, { }, {
"path": "pages/personal/mytestkit/mytestkit", "path": "pages/personal/mytestkit/mytestkit",
@ -380,6 +380,22 @@
"navigationBarTitleText": "我的主页", "navigationBarTitleText": "我的主页",
"navigationBarBackgroundColor": "#284CD1" "navigationBarBackgroundColor": "#284CD1"
} }
},
{
"path" : "pages/personal/myCourse/myCourse",
"style" :
{
"navigationBarTitleText" : "",
"navigationBarBackgroundColor": "#284CD1"
}
},
{
"path" : "pages/personal/courseSign/courseSign",
"style" :
{
"navigationBarTitleText" : "",
"navigationBarBackgroundColor": "#284CD1"
}
} }

@ -1,5 +1,11 @@
<template> <template>
<view> <view>
<view class="infoNav" :style="{height:infoHeight+ 4 + 'px'}" ></view>
<view class="myNav" :style="{height:navHeight + 'px',top:infoHeight+ 3 + 'px'}">
<view>首页</view>
<image @click="scan" src="http://image.bjkeyware.com/static/index/renliwb/scan.png" class="cycontentitimg" mode=""></image>
</view>
<view :style="{height:infoHeight+navHeight+7+'px'}"></view>
<!-- <button type="primary" open-type="contact">在线咨询</button> --> <!-- <button type="primary" open-type="contact">在线咨询</button> -->
<!-- <button type="primary" @click="test">在线咨询</button> --> <!-- <button type="primary" @click="test">在线咨询</button> -->
<!-- class="contents" :actionStyle="customActionStyle"actionText="搜索" @custom='serchfot'--> <!-- class="contents" :actionStyle="customActionStyle"actionText="搜索" @custom='serchfot'-->
@ -264,447 +270,497 @@
</template> </template>
<script> <script>
import { import { findLabelValueByPropnew } from '@/utils/util.js'
findLabelValueByPropnew import mixin from '@/utils/mixin/index.js'
} from '@/utils/util.js' export default {
import mixin from '@/utils/mixin/index.js' mixins: [mixin],
export default { data() {
mixins: [mixin], return {
data() { navHeight: 0,
return { infoHeight: 0,
title: '首页', title: '首页',
keywares: '', keywares: '',
toollist: [], // toollist: [], //
crowdlist: [], // crowdlist: [], //
tokenshow: false, tokenshow: false,
} }
}, },
onShow() { created() {
this.http.quickGet('/business/tool/listAnon?status=1').then(res => { this.infoHeight = uni.getSystemInfoSync().statusBarHeight
let tooldata = res.data.rows;
tooldata.forEach(item => { // #ifdef MP-WEIXIN
if (item.name == '代码静态分析工具') { // width,height,top,right,left,bottom
item.imgs = 'http://image.bjkeyware.com/static/index/11.png' const custom = wx.getMenuButtonBoundingClientRect()
} else if (item.name == '源代码安全检测工具') { const { height, top } = custom
item.imgs = 'http://image.bjkeyware.com/static/index/5.png' console.log(custom)
} else if (item.name == 'C/C++单元测试工具') { // #endif
item.imgs = 'http://image.bjkeyware.com/static/index/2.png' this.navHeight = height + (top - this.infoHeight) * 2
} else if (item.name == '接口测试工具') { // console.log(custom.height);
item.imgs = 'http://image.bjkeyware.com/static/index/12.png' },
} else if (item.name == 'JAVA单元测试工具') { onShow() {
item.imgs = 'http://image.bjkeyware.com/static/index/tool/1.png' this.http.quickGet('/business/tool/listAnon?status=1').then((res) => {
} else if (item.name == '功能测试工具AutoFun') { let tooldata = res.data.rows
item.imgs = 'http://image.bjkeyware.com/static/index/3.png' tooldata.forEach((item) => {
} else if (item.name == '代码组成分析平台') { if (item.name == '代码静态分析工具') {
item.imgs = 'http://image.bjkeyware.com/static/index/tool/4.png' item.imgs = 'http://image.bjkeyware.com/static/index/11.png'
} else if (item.name == '性能测试工具') { } else if (item.name == '源代码安全检测工具') {
item.imgs = 'http://image.bjkeyware.com/static/index/6.png' item.imgs = 'http://image.bjkeyware.com/static/index/5.png'
} else if (item.name == '自鉴-交互式应用安全测试系统IAST') { } else if (item.name == 'C/C++单元测试工具') {
item.imgs = 'http://image.bjkeyware.com/static/index/tool/3.png' item.imgs = 'http://image.bjkeyware.com/static/index/2.png'
} else if (item.name == 'Web应用安全测试工具') { } else if (item.name == '接口测试工具') {
item.imgs = 'http://image.bjkeyware.com/static/index/tool/2.png' item.imgs = 'http://image.bjkeyware.com/static/index/12.png'
} else if (item.name == '资产识别及漏洞管理工具') { } else if (item.name == 'JAVA单元测试工具') {
item.imgs = 'http://image.bjkeyware.com/static/index/zc.png' item.imgs = 'http://image.bjkeyware.com/static/index/tool/1.png'
} else if (item.name == '性能测试工具KeyTurbo') { } else if (item.name == '功能测试工具AutoFun') {
item.imgs = 'http://image.bjkeyware.com/static/index/xn.png' item.imgs = 'http://image.bjkeyware.com/static/index/3.png'
} } else if (item.name == '代码组成分析平台') {
item.typel = item.toolTypeName.slice(0, 2) item.imgs = 'http://image.bjkeyware.com/static/index/tool/4.png'
}) } else if (item.name == '性能测试工具') {
this.toollist = res.data.rows.splice(0, 6) item.imgs = 'http://image.bjkeyware.com/static/index/6.png'
}), } else if (item.name == '自鉴-交互式应用安全测试系统IAST') {
this.http.quickGet('/crowdsource/listAnon?pageNum=1&pageSize=10').then(res => { item.imgs = 'http://image.bjkeyware.com/static/index/tool/3.png'
this.crowdlist = res.data.rows; } else if (item.name == 'Web应用安全测试工具') {
this.crowdlist = this.crowdlist.splice(0, 3) item.imgs = 'http://image.bjkeyware.com/static/index/tool/2.png'
}) } else if (item.name == '资产识别及漏洞管理工具') {
}, item.imgs = 'http://image.bjkeyware.com/static/index/zc.png'
filters: { } else if (item.name == '性能测试工具KeyTurbo') {
tiilnamechange(value) { item.imgs = 'http://image.bjkeyware.com/static/index/xn.png'
if (!value) return '' }
if (value.length > 9) { item.typel = item.toolTypeName.slice(0, 2)
return value.slice(0, 7) + '...' })
} this.toollist = res.data.rows.splice(0, 6)
return value }),
} this.http.quickGet('/crowdsource/listAnon?pageNum=1&pageSize=10').then((res) => {
}, this.crowdlist = res.data.rows
methods: { this.crowdlist = this.crowdlist.splice(0, 3)
findLabelValueByPropnew, })
test() { },
uni.navigateTo({ filters: {
url: '/pages/index/test', tiilnamechange(value) {
// url: 'https://w102.ttkefu.com/k/linkurl/?t=6F5CCH6' if (!value) return ''
if (value.length > 9) {
}) return value.slice(0, 7) + '...'
}, }
// onShareAppMessage(res) { return value
// if (res.from === 'button') {// },
// console.log(res.target) },
// } methods: {
// return { findLabelValueByPropnew,
// title: '', test() {
// path: '/pages/test/test?id=123' uni.navigateTo({
// } url: '/pages/index/test',
// }, // url: 'https://w102.ttkefu.com/k/linkurl/?t=6F5CCH6'
// })
details(type, id) { },
// console.log('id---',id) // onShareAppMessage(res) {
if (type == 'tool') { // if (res.from === 'button') {//
// uni.showToast({ title: '', icon: 'none', duration: 1000 }); // console.log(res.target)
uni.navigateTo({ // }
url: `./toolleasing/tooldetails?id=${id}` // return {
}) // title: '',
} else { // path: '/pages/test/test?id=123'
uni.navigateTo({ // }
url: `./testcrowdsourc/crowdsourcingdetails?id=${id}` // },
}) //
} details(type, id) {
}, // console.log('id---',id)
// if (type == 'tool') {
serchfot() { // uni.showToast({ title: '', icon: 'none', duration: 1000 });
uni.navigateTo({ uni.navigateTo({
url: './searchfor' url: `./toolleasing/tooldetails?id=${id}`,
}) })
}, } else {
cleardata() { uni.navigateTo({
url: `./testcrowdsourc/crowdsourcingdetails?id=${id}`,
}, })
confirm() { }
uni.navigateTo({ },
url: '/pages/personal/login' //
}) serchfot() {
}, uni.navigateTo({
// url: './searchfor',
addcart(id) { })
uni.showToast({ },
title: '该功能开发中', cleardata() {},
icon: 'none', //
duration: 1000 scan() {
}); console.log('二维码扫描')
return; // uni.navigateTo({
let accessToken = uni.getStorageSync('accessToken'); // url:`/pages/personal/courseSign/courseSign`
if (!accessToken) { // })
this.tokenshow = true uni.scanCode({
} else { onlyFromCamera: true,
this.http.quickGet(`/my/addShoppingCart/${id}/1`, true).then(response => { success: function (res) {
console.log('response', response) if (res.result) {
if (response.data.code == 200) { uni.navigateTo({
console.log('111') url: `/pages/personal/courseSign/courseSign?objStr=${res.result}`,
this.$refs.uToast.show({ })
title: '添加购物车成功', } else {
type: 'success', uni.showToast({ title: '无法识别二维码', icon: 'none', duration: 1000 })
duration: 1000, }
isTab: true, },
url: '/pages/shoppingtrolley/shoppingtrolley' })
}) },
} confirm() {
}) uni.navigateTo({
} url: '/pages/personal/login',
})
}, },
// //
gametype(type) { addcart(id) {
if (type == 'test') { uni.showToast({
uni.navigateTo({ title: '该功能开发中',
url: './testtraining/testtraining' icon: 'none',
}) duration: 1000,
} else if (type == 'crowd') { })
uni.switchTab({ return
url: '/pages/index/testcrowdsourc/testcrowdsourc' let accessToken = uni.getStorageSync('accessToken')
}) if (!accessToken) {
} else if (type == 'tool') { this.tokenshow = true
// uni.showToast({ } else {
// title: '线', this.http.quickGet(`/my/addShoppingCart/${id}/1`, true).then((response) => {
// icon: 'none', console.log('response', response)
// duration: 1000 if (response.data.code == 200) {
// }); console.log('111')
uni.navigateTo({ this.$refs.uToast.show({
url:'./toolleasing/toolleasing' title: '添加购物车成功',
}) type: 'success',
} else { duration: 1000,
// uni.showToast({ title: '线', icon: 'none', duration: 1000 }); isTab: true,
const userinform = uni.getStorageSync('wxUserInfo'); url: '/pages/shoppingtrolley/shoppingtrolley',
if (userinform && userinform.companyStatus == 2) { })
uni.navigateTo({ }
url: '/pages/index/outsourcing/outsourcing' })
}) }
} else { },
uni.navigateTo({ //
url: '/pages/index/outsourcing/cloudUserPage' gametype(type) {
}) if (type == 'test') {
} uni.navigateTo({
url: './testtraining/testtraining',
} })
}, } else if (type == 'crowd') {
// uni.switchTab({
applytest(type) { url: '/pages/index/testcrowdsourc/testcrowdsourc',
uni.navigateTo({ })
url: `./testtraining/testtraining?currenttab=${type}` } else if (type == 'tool') {
}) // uni.showToast({
} // title: '线',
} // icon: 'none',
} // duration: 1000
// });
uni.navigateTo({
url: './toolleasing/toolleasing',
})
} else {
// uni.showToast({ title: '线', icon: 'none', duration: 1000 });
const userinform = uni.getStorageSync('wxUserInfo')
if (userinform && userinform.companyStatus == 2) {
uni.navigateTo({
url: '/pages/index/outsourcing/outsourcing',
})
} else {
uni.navigateTo({
url: '/pages/index/outsourcing/cloudUserPage',
})
}
}
},
//
applytest(type) {
uni.navigateTo({
url: `./testtraining/testtraining?currenttab=${type}`,
})
},
},
}
</script> </script>
<style> <style>
page { .infoNav {
background-color: #F7F7F7; position: fixed;
} width: 100%;
background-color: #284cd1;
.logobg { z-index: 99;
width: 100vw; }
height: 51vw; .myNav {
background-size: 100% 55vw; position: fixed;
background-image: url('http://image.bjkeyware.com/static/index/hhome_page.png'); width: 100%;
background-repeat: no-repeat; text-align: center;
padding: 20px 5vw 20px 5vw; color: #ffffff;
margin-top: -1px; font-family: PingFang-SC-Bold;
display: flex;
/* padding:30px 0vw 20px 5vw; */ align-items: center;
/* z-index:0; */ justify-content: center;
} background-color: #284cd1;
z-index: 99;
.keyewar { /* position: relative; */
width: 72vw; }
border-radius: 50rpx; page {
/* position: relative; */ background-color: #f7f7f7;
/* margin:1vw 5vw 20px 0vw; }
.myNav image {
position: absolute;
width: 50rpx;
height: 50rpx;
left: 34rpx;
margin-right: 10rpx;
}
.logobg {
width: 100vw;
height: 51vw;
background-size: 100% 55vw;
background-image: url('http://image.bjkeyware.com/static/index/hhome_page.png');
background-repeat: no-repeat;
padding: 20px 5vw 20px 5vw;
margin-top: -1px;
/* padding:30px 0vw 20px 5vw; */
/* z-index:0; */
}
.keyewar {
width: 72vw;
border-radius: 50rpx;
/* position: relative; */
/* margin:1vw 5vw 20px 0vw;
display: flex; display: flex;
justify-content: space-between; */ justify-content: space-between; */
/* padding: 10px; */ /* padding: 10px; */
} }
.buttonyz1 { .buttonyz1 {
width: 139rpx; width: 139rpx;
height: 49rpx; height: 49rpx;
background: #a8aeb6; background: #a8aeb6;
border-radius: 25rpx; border-radius: 25rpx;
color: #FFFFFF; color: #ffffff;
font-size: 24rpx; font-size: 24rpx;
text-align: center; text-align: center;
line-height: 49rpx; line-height: 49rpx;
} }
.customActionStyle { .customActionStyle {
width: 115rpx; width: 115rpx;
height: 60rpx; height: 60rpx;
background: linear-gradient(90deg, #5EA6FD, #1A81F9); background: linear-gradient(90deg, #5ea6fd, #1a81f9);
border-radius: 39rpx; border-radius: 39rpx;
text-align: center; text-align: center;
line-height: 55rpx; line-height: 55rpx;
color: #FFFFFF; color: #ffffff;
font-size: 14px; font-size: 14px;
z-index: 99; z-index: 99;
} }
/* @media screen and (max-width: 350px) { /* @media screen and (max-width: 350px) {
body { body {
font-size: 14px; font-size: 14px;
color: blue; color: blue;
} }
} */ } */
.contents { .contents {
padding-bottom: 50px padding-bottom: 50px;
} }
.fouassociation { .fouassociation {
position: relative; /* position: relative; */
/* z-index: 2; */ /* z-index: 2; */
/* width:90vw; */ /* width:90vw; */
margin: -12vw 3vw 0 3vw; margin: -12vw 3vw 0 3vw;
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
background: rgba(255, 255, 255, 1); background: rgba(255, 255, 255, 1);
box-shadow: 0px 0px 29px 0px rgba(187, 86, 25, 0.17); box-shadow: 0px 0px 29px 0px rgba(187, 86, 25, 0.17);
border-radius: 10px; border-radius: 10px;
padding: 0 5px; padding: 0 5px;
} }
.association { .association {
width: 20vw; width: 20vw;
margin: 10px 0; margin: 10px 0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
position: relative; position: relative;
} }
.association img { .association img {
width: 13vw; width: 13vw;
height: 13vw; height: 13vw;
margin-bottom: 5px; margin-bottom: 5px;
display: block; display: block;
} }
.association text { .association text {
font-size: 14px; font-size: 14px;
display: block; display: block;
} }
.schedule { .schedule {
width: 94vw; width: 94vw;
margin: 30px 3vw 20px 3vw; margin: 30px 3vw 20px 3vw;
} }
.koeui { .koeui {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between; justify-content: space-between;
}
}
.currekei {
.currekei { width: 48%;
width: 48%; /* height: 360rpx; */
/* height: 360rpx; */ background: #ffffff;
background: #FFFFFF; border-radius: 10px;
border-radius: 10px; padding: 10px 10px;
padding: 10px 10px; margin-bottom: 20rpx;
margin-bottom: 20rpx }
}
.leop {
.leop { font-size: 30rpx;
font-size: 30rpx; /* height:40px ; */
/* height:40px ; */ font-weight: bold;
font-weight: bold; color: #1a1a1a;
color: #1A1A1A; /* margin: 13rpx 0; */
/* margin: 13rpx 0; */ display: flex;
display: flex; align-items: center;
align-items: center; justify-content: center;
justify-content: center; }
} .leop1 {
.leop1 { overflow: hidden;
overflow: hidden; text-overflow: ellipsis;
text-overflow: ellipsis; display: -webkit-box;
display: -webkit-box; -webkit-line-clamp: 1;
-webkit-line-clamp: 1; /*! autoprefixer: off */
/*! autoprefixer: off */ -webkit-box-orient: vertical;
-webkit-box-orient: vertical; justify-content: flex-start;
justify-content: flex-start; }
}
.tabone {
.tabone { padding: 2rpx 5rpx;
padding: 2rpx 5rpx; border: 1px solid #2b80fc;
border: 1px solid #2B80FC; border-radius: 4rpx;
border-radius: 4rpx; font-size: 20rpx;
font-size: 20rpx; font-weight: 500;
font-weight: 500; color: #2387ee;
color: #2387EE; text-align: center;
text-align: center; box-sizing: border-box;
box-sizing: border-box; }
}
.currekei :nth-child(4) {
.currekei :nth-child(4) { color: #fd461a;
color: #FD461A; font-weight: 800;
font-weight: 800; font-size: 34rpx;
font-size: 34rpx; }
}
.imgone {
.imgone { width: 180rpx;
width: 180rpx; margin: 10px auto;
margin: 10px auto; text-align: center;
text-align: center; display: flex;
display: flex; align-items: center;
align-items: center; justify-content: center;
justify-content: center; }
}
.imgone img {
.imgone img { width: 100%;
width: 100%; height: 100%;
height: 100%; }
}
.imgsone {
.imgsone { width: 150rpx;
width: 150rpx; margin: 20px auto;
margin: 20px auto; }
}
.imgsone img {
.imgsone img { width: 150rpx;
width: 150rpx; height: 123rpx;
height: 123rpx; }
}
.imgtwo {
.imgtwo { width: 32rpx;
width: 32rpx; height: 32rpx;
height: 32rpx; }
}
.notice {
.notice { /* width: 90vw; */
/* width: 90vw; */ /* height: 130px; */
/* height: 130px; */ margin-top: 10px;
margin-top: 10px; background: #ffffff;
background: #FFFFFF; border-radius: 10px;
border-radius: 10px; display: flex;
display: flex; padding: 10px 15px;
padding: 10px 15px; align-items: center;
align-items: center; }
}
.typej {
.typej { font-size: 24rpx;
font-size: 24rpx; color: #9d9d9d;
color: #9D9D9D; margin: 13rpx 0;
margin: 13rpx 0; overflow: hidden;
overflow: hidden; text-overflow: ellipsis;
text-overflow: ellipsis; white-space: nowrap;
white-space: nowrap; }
}
.buttonyz {
.buttonyz { width: 139rpx;
width: 139rpx; height: 49rpx;
height: 49rpx; background: linear-gradient(90deg, #5ea6fd, #1a81f9);
background: linear-gradient(90deg, #5EA6FD, #1A81F9); border-radius: 25rpx;
border-radius: 25rpx; color: #ffffff;
color: #FFFFFF; font-size: 24rpx;
font-size: 24rpx; text-align: center;
text-align: center; line-height: 49rpx;
line-height: 49rpx; }
}
.fline {
.fline { width: 100%;
width: 100%; height: 1rpx;
height: 1rpx; border: 1rpx solid #f2f2f2;
border: 1rpx solid #F2F2F2; opacity: 0.15;
opacity: 0.15; }
}
.statictosol {
.statictosol { width: 48%;
width: 48%; height: 180px;
height: 180px; background: #ffffff;
background: #FFFFFF; border-radius: 10rpx;
border-radius: 10rpx; text-align: center;
text-align: center; margin-top: 20px;
margin-top: 20px; padding: 15px 10px;
padding: 15px 10px; }
}
.statictosol img {
.statictosol img { width: 17vw;
width: 17vw; height: 17vw;
height: 17vw; margin-bottom: 10px;
margin-bottom: 10px; }
}
.statictosol p {
.statictosol p { font-size: 0.8rem;
font-size: .8rem; color: #808080;
color: #808080; margin-bottom: 5px;
margin-bottom: 5px; line-height: 21px;
line-height: 21px }
}
.tostnew {
.tostnew { position: absolute;
position: absolute; top: -12rpx;
top: -12rpx; right: -32rpx;
right: -32rpx; }
} .tostnewimg {
width: 76rpx;
.tostnewimg { height: 32rpx;
width: 76rpx; }
height: 32rpx;
} .tostnewtext {
position: absolute;
.tostnewtext { top: 3rpx;
position: absolute; left: 50%;
top: 3rpx; transform: translateX(-50%);
left: 50%; white-space: nowrap;
transform: translateX(-50%); font-weight: 500;
white-space: nowrap; font-size: 16rpx !important;
font-weight: 500; color: #ffffff;
font-size: 16rpx !important; }
color: #FFFFFF;
}
</style> </style>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,151 @@
<template>
<view class="sourseSignIn">
<view class="scanSuc" v-if="scanResult">
<view class="className">
{{ className }}
</view>
<view class="courseName">
{{ courseName }}
</view>
<view class="signBtn" @click="signIn" v-if="!isSignin">
<view>签到</view>
<view>{{ nowTime }}</view>
</view>
<view class="signBtn" v-else>
<img src="./signSuc.png" alt="" />
<view>已签到</view>
</view>
</view>
<view class="scanFail" v-else>
<img src="./error.png" alt="" />
<view>无法识别二维码</view>
</view>
</view>
</template>
<script>
import { decodeChinse } from '@/utils/encodeChinese.js'
export default {
data() {
return {
courseId: '',
className: '',
courseName: '',
scanResult: true,
isSignin: false,
}
},
onLoad(options) {
try {
const obj = JSON.parse(JSON.parse(options.objStr))
console.log(obj)
this.courseId = obj.courseId
console.log(this.courseId)
this.className = decodeChinse(obj.className)
this.courseName = decodeChinse(obj.courseName)
uni.setNavigationBarTitle({ title: this.courseName })
this.init()
} catch (e) {
this.scanResult = false
}
},
computed: {
nowTime() {
const currentDate = new Date()
let hours = currentDate.getHours()
if (hours < 10) hours = '0' + hours
let minutes = currentDate.getMinutes()
if (minutes < 10) minutes = '0' + minutes
let second = currentDate.getSeconds()
if (second < 10) second = '0' + second
const formattedDate = `${hours}:${minutes}:${second}`
return formattedDate
},
},
methods: {
signIn() {
const data = {
courseId: this.courseId,
}
console.log(data)
this.http.quickPost(`/course/singin`, data, true).then((response) => {
console.log(response)
if (response.data.code == 500) {
uni.showToast({ title: response.data.msg, icon: 'none', duration: 1000 })
} else if (response.data.code == 200) {
this.isSignin = true
}
})
},
init() {
this.http.quickGet(`/course/singin/${this.courseId}`,true).then((response) => {
console.log(response);
if(response.data.msg == '已签到'){
this.isSignin = true
}
})
},
},
}
</script>
<style lang="scss">
.sourseSignIn {
height: 100%;
overflow: hidden;
background: linear-gradient(0deg, #d1e9fe, #ffffff);
.scanSuc {
font-family: PingFang SC;
.className {
font-weight: bold;
font-size: 30rpx;
color: #000000;
line-height: 46rpx;
margin: 30rpx;
}
.courseName {
font-weight: 500;
font-size: 30rpx;
color: #4d4d4d;
line-height: 46rpx;
margin-left: 30rpx;
}
.signBtn {
margin: 0 auto;
margin-top: 300rpx;
background-color: #4899f7;
color: #fff;
border-radius: 50%;
width: 250rpx;
height: 250rpx;
text-align: center;
display: flex;
// font-weight: bold;
flex-direction: column;
align-items: center;
justify-content: center;
img {
width: 50rpx;
height: 50rpx;
margin-bottom: 5rpx;
}
}
}
.scanFail {
margin: 0 auto;
margin-top: 500rpx;
height: 200rpx;
text-align: center;
font-weight: bold;
font-size: 30rpx;
img {
width: 50rpx;
height: 50rpx;
margin-bottom: 5rpx;
}
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -0,0 +1,115 @@
<template>
<view class="courseWrapper">
<view v-if="courseList.length">
<view class="courseItem" v-for="course in courseList" :key="course.courseId">
<view class="courseName">{{ course.courseName }}</view>
<view class="courseTime">{{ course.courseTime }}</view>
<view class="courseSource" @click="courseDialog">课程资料</view>
<view class="signInfo" :style="{ background: course.status ? '#28D17C' : '#FBA02A' }">{{
course.status ? '已签到' : '未签到'
}}</view>
</view>
</view>
<view class="mycourseWrapper" v-else> 暂未配置课程 </view>
</view>
</template>
<script>
export default {
data() {
return {
courseList: [],
}
},
onLoad(options) {
console.log('进入course')
const classId = options.id
const className = options.name
console.log(options)
uni.setNavigationBarTitle({ title: className })
this.getCourseList(classId)
},
methods: {
async getCourseList(classId) {
this.http.quickGet(`/course/myCourse/class/${classId}`, true).then((res) => {
console.log(res)
this.courseList = res.data.rows
})
},
courseDialog() {
const url = 'https://www.bjkeyware.com'
uni.showModal({
title: '请去PC端下载资料',
content: 'PC端网址:'+url,
showCancel: false,
confirmText: '复制网址',
success: function (res) {
if (res.confirm) {
uni.setClipboardData({
data: url,
success: function () {
uni.showToast({
title: '复制成功',
})
},
fail: function () {
uni.showToast({
title: '复制失败',
})
},
})
console.log('用户点击确定')
}
},
})
},
},
}
</script>
<style scoped>
.courseWrapper {
}
.mycourseWrapper {
text-align: center;
line-height: 300rpx;
}
.courseItem {
position: relative;
margin: 25rpx;
width: 700rpx;
height: 210rpx;
margin-bottom: 0;
padding: 30rpx;
background: #ffffff;
border-radius: 10rpx;
font-family: PingFang SC;
font-weight: 500;
font-size: 24rpx;
line-height: 50rpx;
}
.courseName {
/* width: 369rpx; */
/* height: 29rpx; */
font-weight: bold;
font-size: 30rpx;
color: #000000;
}
.courseTime {
color: #4d4d4d;
}
.courseSource {
color: #2853e4;
}
.signInfo {
width: 110rpx;
/* height: 40rpx; */
line-height: 40rpx;
border-radius: 20rpx;
text-align: center;
color: #fff;
position: absolute;
top: 85rpx;
right: 25rpx;
}
</style>

@ -78,7 +78,6 @@
</view> </view>
</view> </view>
</block> </block>
<!-- <u-tag :text="testerStatustext" plan type="info" shape='circle' color='#FEFEFE' <!-- <u-tag :text="testerStatustext" plan type="info" shape='circle' color='#FEFEFE'
bg-color='#1A81F9' border-color='transparent' @click="nextcert" /> --> bg-color='#1A81F9' border-color='transparent' @click="nextcert" /> -->
</view> </view>
@ -188,12 +187,7 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view style="height:15px"> </view> <view style="height:15px"> </view>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
<u-modal title='温馨提示' v-model="tokenshow" content="您还没有登录" confirm-text='现在就去' cancel-text='稍等一下' <u-modal title='温馨提示' v-model="tokenshow" content="您还没有登录" confirm-text='现在就去' cancel-text='稍等一下'
@ -285,6 +279,7 @@
// //
async getNum() { async getNum() {
this.http.quickGet(`/train/myTrainingList`, true).then(res => { this.http.quickGet(`/train/myTrainingList`, true).then(res => {
// console.log(res);
this.signuplistLength = res.data.rows.length this.signuplistLength = res.data.rows.length
}) })

@ -159,10 +159,6 @@
</view> </view>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
</view> </view>
</template> </template>
<script> <script>

@ -11,7 +11,9 @@
<p v-if="item.registrationTime" style="font-size:24rpx;color: #808080;">报名时间{{ dateFormat(new Date(item.registrationTime))}} </p> <p v-if="item.registrationTime" style="font-size:24rpx;color: #808080;">报名时间{{ dateFormat(new Date(item.registrationTime))}} </p>
</view> </view>
<view class="fline"></view> <view class="fline"></view>
<view style="display: flex;justify-content: space-between;margin: 19px 15px 0 15px;align-items: center;"> <view
@click="catCourse(item)"
style="display: flex;justify-content: space-between;margin: 19px 15px 0 15px;align-items: center;">
<view style="color:#333333FF;font-size:13px;line-height:27px;"> <view style="color:#333333FF;font-size:13px;line-height:27px;">
<p>班级名称{{item.trainClassName}}</p> <p>班级名称{{item.trainClassName}}</p>
<!-- start_time --> <!-- start_time -->
@ -68,6 +70,14 @@
url:`/pages/index/testtraining/signup?issueId=${id}&type=1` url:`/pages/index/testtraining/signup?issueId=${id}&type=1`
}) })
}, },
catCourse(state){
console.log(state);
// if(state.status == '4'){
uni.navigateTo({
url:`/pages/personal/myCourse/myCourse?id=${state.trainClassId}&name=${state.trainClassName}`
})
// }
}
} }
} }
</script> </script>

@ -0,0 +1,16 @@
function encodeChinese(str){
if(!str){
return ''
}
return encodeURIComponent(str)
}
function decodeChinse(str){
if(str){
return decodeURIComponent(str)
}
}
export {
encodeChinese,decodeChinse
}

@ -1,7 +1,7 @@
import comstemutil from "./comstemutil"; import comstemutil from "./comstemutil";
//es6 //es6
// const baseUrl = 'http://192.168.0.229:9999'; // const baseUrl = 'http://192.168.0.230:9999';
const baseUrl = 'https://www.bjkeyware.com/test-api'; const baseUrl = 'https://www.bjkeyware.com/test-api';
// const baseUrl = 'https://www.bjkeyware.com/prod-api'; // const baseUrl = 'https://www.bjkeyware.com/prod-api';

Loading…
Cancel
Save