bb678af5 by 杨炀

no message

1 parent 9da759d0
......@@ -51,5 +51,4 @@ export default {
/*每个页面公共css */
@import '/common/uni.css';
@import '/common/mystyle.scss';
@import '@/static/font/iconfont.css';
</style>
\ No newline at end of file
......
......@@ -670,6 +670,13 @@ function groupWithDraw(data) {
params: data
})
}
function certifiedwithDraw(data) {
return request({
url: `/member/certified/withDraw`,
method: 'post',
params:data
})
}
// 省合并缴费通知单
function mergePayMentApi(data) {
return request({
......@@ -701,6 +708,13 @@ function unMerge(recordId) {
method: 'post'
})
}
function certifiedunMerge(recordId) {
return request({
url: `/member/certified/unMerge/${recordId}`,
method: 'post'
})
}
function dellevelPerson(examId) {
return request({
url: '/exam/person/' + examId,
......@@ -1031,4 +1045,5 @@ export {
getMemberInfoModRange,commitGroupChange,delGroupChange,
getChangeGroupByRangeId,groupInfoMod,addGroupInfoModeToRange,
groupChangeEditMod,groupChangeAudit,extractInfoFromChinaIdCard
,certifiedwithDraw,certifiedunMerge
}
\ No newline at end of file
......
......@@ -95,7 +95,7 @@ page {
.uni-forms-item__content{text-align: right;}
.uni-date-x .icon-calendar{display: none;}
.uni-date__x-input{font-size: 30rpx!important;}
.selected-area{justify-content: right;font-size: 30rpx;}
.selected-area{justify-content: flex-end;font-size: 30rpx;}
.input-value{padding: 0!important;}
.input-value-border{padding: 0;}
.uni-forms-item__label{ flex-direction: row-reverse!important; justify-content: start!important;}
......
......@@ -7,6 +7,7 @@
// const baseUrl_api = "http://123.60.96.243/stage-api/";
const baseUrl_api = 'http://192.168.1.11:8787'
// const baseUrl_api = 'https://ztx.itechtop.cn/stage-api'
// const baseUrl_api = 'https://tkcn.19wk.cn:8001/stage-api'
// const baseUrl_api = 'https://newsystem.taekwondo.org.cn/stage-api/'
// train
......
......@@ -38,7 +38,10 @@
<view class="func" v-if="item.auditStatus == 100">
<button @click="handleAudit(item)">提交</button>
<!-- <button v-if="item.lastIds?.slice(0, 1) != '-'" @click="resolution(item)">取消合并</button> -->
<button v-if="item.lastIds?.slice(0, 1) != '-'" @click="resolution(item)">取消合并</button>
</view>
<view class="func" v-if="item.auditStatus == 1 && item.isView == 1">
<button @click="sendBack(item)">撤回</button>
</view>
</view>
</view>
......@@ -194,6 +197,45 @@
url: path
});
}
function sendBack(row){
uni.showModal({
title: '提示',
content: `确定撤回${row.content.certName}吗`,
success: function(res) {
if (res.confirm) {
api.certifiedwithDraw({
recordId: row.recordId,
reason: row.reason
}).then(res => {
uni.showToast({
title: '操作成功',
icon: 'none'
})
getList()
})
}
}
})
}
function resolution(row){
uni.showModal({
title: '提示',
content: `确定拆分${row.content.certName}吗`,
success: function(res) {
if (res.confirm) {
api.certifiedunMerge(row.recordId).then(res => {
uni.showToast({
title: '已拆分',
icon: 'none'
})
getList()
})
}
}
})
}
</script>
<style scoped>
......
......@@ -531,27 +531,12 @@
}]
},{
"root": "training",
"pages":[{
"path" : "trainList",
"style" :
{
"navigationBarTitleText" : "培训列表",
"enablePullDownRefresh" : false
}
},
{
"path" : "detailPage",
"style" :
{
"navigationBarTitleText" : "培训详情",
"enablePullDownRefresh" : false
}
}]
"pages":[]
}],
"preloadRule": {
"pages/index/index": {
"network": "all",
"packages": ["login","personalVip", "group","level","training"]
"packages": ["login","personalVip", "group","level"]
}
}
}
\ No newline at end of file
......
......@@ -108,7 +108,7 @@
<uni-data-checkbox v-model="form.newSex" :localdata="sexs" />
</uni-forms-item>
<uni-forms-item label="证件类型:" v-show="type=='newIdcType'">
<uni-data-select v-model="form.newIdcType" :localdata="cardType"
<uni-data-select v-model="form.newIdcType" :localdata="cardType1"
:clear='false'></uni-data-select>
</uni-forms-item>
<uni-forms-item label="证件号码:" v-show="type=='newIdcCode'">
......@@ -212,6 +212,23 @@
value: '5'
}
])
const cardType1 = ref([{
text: '身份证',
value: '0'
},
{
text: '港澳台通行证 ',
value: '1'
},
{
text: '外国护照',
value: '3'
},
{
text: '户口本',
value: '5'
}
])
onLoad((option) => {
if (option.rangeId) {
queryParams.value.rangeId = option.rangeId
......
......@@ -181,10 +181,6 @@
text: "外国护照"
},
{
value: '4',
text: "其它"
},
{
value: '5',
text: "户口本"
}
......
......@@ -504,7 +504,4 @@
text-align: left;
}
:deep(.selected-list) {
justify-content: flex-end;
}
</style>
\ No newline at end of file
......
......@@ -22,6 +22,7 @@
</uni-list>
</view>
<view class="height1"></view>
</template>
<script setup>
......@@ -72,7 +73,8 @@
</script>
<style scoped lang="scss">
.mainbox{margin: 30rpx 25rpx;padding: 1px;
.height1{height:1rpx}
.mainbox{margin: 30rpx 25rpx 60rpx;padding: 1px;
background: #FFFFFF;
border-radius: 15rpx;
:deep(.uni-list-item__content-title){color: #4C5359;font-size: 30rpx;
......
<template>
<view>
<z-paging ref="paging" v-model="list" @query="getQuery" emptyViewImg="/static/nodata.png">
<z-paging ref="paging" v-show="total>0" v-model="list" @query="getQuery" emptyViewImg="/static/nodata.png">
<view class="searchbar" :slot="top">
<uni-easyinput placeholderStyle="font-size:30rpx" :input-border="false" prefixIcon="search"
v-model="query.name" @blur="getList" @clear="getList" placeholder="搜索姓名">
</uni-easyinput>
</view>
<uni-swipe-action>
<uni-swipe-action-item class="personitem" v-for="(n,index) in list" :key="index">
<view class="content-box" @click="handleInfo(n)">
......@@ -53,13 +52,12 @@
</template>
</uni-swipe-action-item>
</uni-swipe-action>
</z-paging>
<view class="nodata" v-if="list.length==0">
<!-- <image mode="aspectFit" src="/static/nodata.png"></image> -->
<button class="btn-red" v-if="userType=='4'" @click="goVipList">+ 添加会员</button>
<!-- <text v-else>暂无数据</text> -->
</view>
</z-paging>
</view>
</template>
......@@ -71,7 +69,7 @@
ref
} from 'vue'
import {
onLoad
onLoad,onShow
} from '@dcloudio/uni-app'
const query = ref({
pageNum: 1,
......@@ -89,7 +87,7 @@
onLoad(() => {
userType.value = app.globalData.userType
})
onMounted(() => {
onShow(() => {
getList()
})
function getQuery(pageNum,pageSize){
......
@font-face {
font-family: "iconfont";
/* Project id 3873999 */
src: url('/static/font/iconfont.ttf') format('woff2'),
url('/static/font/iconfont.ttf') format('woff'),
url('/static/font/iconfont.ttf') format('truetype');
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-31dingwei:before {
content: "\e600";
}
.icon-ai253:before {
content: "\e6f1";
}
.icon-loufangfangzi:before {
content: "\e729";
}
No preview for this file type
<template>
<view class="box">
<view class="box1">
<view class="title">
<view class="title-left">{{ porps.title }}</view>
<view class="title-icon" @click="changFN">
<uni-icons type="top" color="#95a1a6" v-if="show"></uni-icons>
<uni-icons type="bottom" color="#95a1a6" v-else></uni-icons>
</view>
</view>
<view class="conter-liner-cost">
<view class="liner-left">{{ porps.text }}&nbsp;&nbsp; 合计:</view>
<view class="liner-right">{{ porps.cost }}</view>
</view>
</view>
<view class="box2" v-show="show"><slot></slot></view>
</view>
</template>
<script setup>
import { ref } from 'vue';
const porps = defineProps({
title: String,
text: String,
cost: String
});
const show = ref(false);
function changFN() {
show.value = !show.value;
}
</script>
<style lang="scss" scoped>
.box {
margin: 0;
padding: 0 25rpx;
.box1 {
margin-bottom: 23rpx;
margin-top: 35rpx;
.title {
display: flex;
justify-content: space-between;
margin-bottom: 10rpx;
.title-left {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500;
color: #2b3133;
}
}
.conter-liner-cost {
display: flex;
.liner-left {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #7b7f83;
}
.liner-right {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #ff8124;
}
}
}
.box2 {
border-top: 1rpx solid #e6e6e6;
}
}
</style>
<template>
<view class="box">
<view class="box-title">
<view class="title-left">是否住宿</view>
<view class="title-right ">
<radio-group name="radio" @change="radio">
<label>
<radio value="1" :checked="flag" />
<text></text>
</label>
<label>
<radio value="0" :checked="!flag" />
<text></text>
</label>
</radio-group>
</view>
</view>
<!-- 酒店信息 -->
<view class="box-conter" v-if="flag">
<checkbox-group @change="change">
<view class="conter-conter" v-for="item in range" :key="item.id">
<view class="bgcColor">
<view class="conter-top">
<view class="text">{{ item.name }}</view>
<checkbox :value="item.hotelFlag" @click="checkedFN(item)" :disabled="disabled" />
</view>
<view class="box-dress">
<uni-icons custom-prefix="iconfont" type="icon-31dingwei" color="#95A1A6"></uni-icons>
{{ item.address }}
</view>
<view class="conter-text">
<view class="conter-liner">
<view class="liner-left">房型:</view>
<view class="liner-right">{{ item.houseType }}</view>
</view>
<view class="conter-liner">
<view class="liner-left">价格:</view>
<view class="liner-right">{{ item.spend }}</view>
</view>
<view class="conter-liner">
<view class="liner-left">餐食:</view>
<view class="liner-right">{{ item.haveDinner == 1 ? '含早' : '不含早参' }}</view>
</view>
<view class="conter-liner">
<view class="liner-left">入住时间:</view>
<view class="liner-right liner-move">
<view class="liner-right-hotl" v-for="val in item.move" :key="val.id">
<uni-datetime-picker
:start="val.moveIntoTime"
:end="val.leaveTime"
type="daterange"
v-model="val.move"
return-type="yyyy/MM/dd"
@change="maskClick(val)"
/>
<uni-icons
class="liner-del"
@click="delHot(item, val)"
v-if="item.move.length > 1"
custom-prefix="custom-icon"
type="trash"
size="20"
/>
</view>
<uni-icons
@click="addHot(item)"
custom-prefix="custom-icon"
type="plusempty"
size="20"
/>
</view>
</view>
</view>
</view>
</view>
</checkbox-group>
<view class="remark" v-if="hotelList">
<view class="liner-left">备注:</view>
<input class="uni-input" v-model="remark" placeholder="请输入你的内容" />
</view>
</view>
<view class="foot ">
<view class="button1" @click="upFN">上一步</view>
<view class="button" @click="nextFN">下一步</view>
</view>
</view>
</template>
<script setup>
import * as train from '@/common/train.js';
import {
onLoad,
onReady,
onShareAppMessage,
onShareTimeline,
onPullDownRefresh,
onReachBottom,
onShow
} from '@dcloudio/uni-app';
import { ref, getCurrentInstance, reactive, watch, toRefs } from 'vue';
const emit = defineEmits(['nextFN']);
const props = defineProps({
projectIdsArray: {},
id: {},
signId: {},
examIdsArry: {}
});
const moveList = ref([
{
id: 1,
move: null
}
]);
const hotShow = ref(true);
const popup = ref();
const hotlList = ref();
const omve = ref();
const arr = ref([]);
const range = ref();
const id = ref(props.id);
const hotelIdsArray = ref();
const state = ref(); //是否住宿
const remark = ref();
const flag = ref(true);
const disabled = ref(false);
const costID = ref();
const code = ref();
const status = ref();
const signId = ref();
const data = reactive({
addForm: {}
});
const { addForm } = toRefs(data);
onShow(() => {
status.value = 3;
});
getList();
async function getList() {
addForm.value.id = id.value;
let res = await train.trainParticulars(addForm.value);
status.value = res.data.signStatus;
range.value = res.data.hotelList;
range.value.forEach(item => {
let tId = uuid();
item.move = [
{
moveIntoTime: item.moveIntoTime.replace(/-/g, '/'),
leaveTime: item.leaveTime.replace(/-/g, '/'),
id: tId,
hotlId: item.id,
move: [item.moveIntoTime.replace(/-/g, '/'), item.leaveTime.replace(/-/g, '/')]
}
];
});
// 数据加工
if (res.data.signId) signId.value = res.data.signId;
console.log(range.value);
}
function uuid() {
var s = [];
var hexDigits = '0123456789abcdef';
for (var i = 0; i < 36; i++) {
s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
}
s[14] = '4'; // bits 12-15 of the time_hi_and_version field to 0010
s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01
s[8] = s[13] = s[18] = s[23] = '-';
var uuid = s.join('');
return uuid;
}
// 是否住宿
function changeRadio(e) {
console.log(e);
if (e.target.value == 0) {
hotShow.value = false;
} else {
hotShow.value = true;
}
}
// 获取用酒店信息
function change(e) {
hotelIdsArray.value = e.target;
}
// 封装数据处理
function changeKey(arr) {
let newArr = [];
arr.forEach(item => {
newArr.push({
text: item.moveIntoTimeStr,
value: item.id
});
});
return newArr;
}
// 下一步
async function nextFN() {
await initData();
}
// 上一步
function upFN() {
console.log(111);
emit('nextFN', 1);
}
// 是否住宿
function radio(e) {
console.log(e);
e.target.value == 1 ? (flag.value = true) : (flag.value = false);
console.log(flag.value);
}
// 页面跳转
async function goRenew() {
let path = `/pages/train/costBreakdown/costBreakdown?id=` + id.value;
await wx.navigateTo({
url: path
});
}
function checkedFN(item) {
item.hotelFlag = !item.hotelFlag;
}
// 日期确定时处发
// function maskClick(item) {
// item.move.forEach(val => {
// val = val.replace(/-/g, '/');
// });
// console.log(item.move);
// console.log(item);
// }
// 添加住宿
function addHot(item) {
let tId = uuid;
item.move.push({
moveIntoTime: item.moveIntoTime.replace(/-/g, '/'),
leaveTime: item.leaveTime.replace(/-/g, '/'),
id: tId,
move: [item.moveIntoTime.replace(/-/g, '/'), item.leaveTime.replace(/-/g, '/')],
hotlId: item.id
});
}
function delHot(item, val) {
item.move = item.move.filter(obj => {
return obj.id != val.id;
});
}
// 提交
async function initData() {
let list = null;
list = JSON.parse(JSON.stringify(range.value));
// 1.过滤没有选中的酒店
list = list.filter(item => {
return item.hotelFlag == true;
});
// 2.过滤没有选择日期的
let arr = [];
list.forEach((item, index) => {
arr[index] = item;
arr[index].move = item.move.filter(val => {
return val.move.length != 0;
});
});
// 3.过滤酒店日期相同
let arr1 = [];
arr.forEach((item, index) => {
item.move.forEach(val => {
arr1.push(val);
});
});
let arr2 = [];
arr1.forEach(item => {
item.move = item.move.join();
arr2.push({
hotlId: item.hotlId,
move: item.move
});
});
// // 去重
// for (var i = 0; i < arr2.length - 1; i++) {
// for (var j = i + 1; j < arr2.length; j++) {
// if (arr2[i].move == arr2[j].move) {
// arr2.splice(j, 1);
// j--;
// }
// }
// }
if (flag.value) {
if (arr2.length == 0) {
uni.showToast({
title: '请选择入住酒店!',
duration: 2000,
icon: 'error'
});
return false;
}
addForm.value.hotelIdsArray = arr2;
} else {
addForm.value.hotelIdsArray = [];
}
addForm.value.projectIdsArray = props.projectIdsArray;
addForm.value.examIdsArray = props.examIdsArry;
addForm.value.trainId = id.value;
addForm.value.remark = remark.value;
let res = null;
// if (status.value == null || status.value == 4) {
// 添加
// addForm.value.id = null
addForm.value.id = signId.value;
res = await train.trainNext(addForm.value);
signId.value = res.data;
// } else {
// // 修改
// addForm.value.id = signId.value
// res = await train.trainUpdata(addForm.value);
// }
costID.value = res.data;
// 报名成功才跳转
if (res.code == 200) {
// 酒店是否已住满
goRenew();
}
}
</script>
<style scoped lang="scss">
.box {
margin-top: 5rpx;
padding: 25rpx;
.bgcColor {
background-color: #fff;
border-radius: 15rpx;
padding: 25rpx;
}
.box-title {
padding: 25rpx;
display: flex;
justify-content: space-between;
margin-bottom: 30rpx;
background-color: #fff;
border-radius: 15rpx;
}
.title-left {
text {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
color: #000000;
}
}
.box-conter {
padding: 25rpx 0;
display: block;
.conter-conter {
margin-bottom: 20rpx;
.conter-top {
display: flex;
justify-content: space-between;
margin-bottom: 10rpx;
.text {
font-size: 33rpx;
font-family: PingFang SC;
font-weight: 500;
color: #2b3133;
}
.checkbox {
}
}
.box-dress {
font-family: PingFang SC;
font-weight: 400;
color: #2b3133;
font-size: 24rpx;
border-bottom: 1px solid #e6e6e6;
padding-bottom: 32rpx;
}
.conter-text {
.conter-liner {
display: flex;
justify-content: space-between;
margin-top: 20rpx;
padding: 0 10rpx;
.liner-left {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #7b7f83;
padding-top: 10rpx;
}
.liner-right {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #2b3133;
width: 80%;
text-align: right;
}
}
}
}
}
.remark {
margin-top: 35rpx;
display: flex;
justify-content: space-between;
margin-bottom: 120rpx;
background-color: #fff;
border-radius: 15rpx;
padding: 10rpx 25rpx;
.liner-left {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #7b7f83;
padding-top: 18rpx;
}
}
.foot {
background-color: #ffffff;
padding: 20rpx 0;
position: absolute;
left: 0;
bottom: 0;
width: 100%;
display: flex;
.button {
margin: 0 auto;
height: 80rpx;
width: 300rpx;
text-align: center;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 80rpx;
background: linear-gradient(270deg, #54e1b9, #00caa6);
border-radius: 40rpx;
}
.button1 {
margin: 0 auto;
height: 80rpx;
width: 300rpx;
text-align: center;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
line-height: 80rpx;
background: #fff;
border-radius: 40rpx;
border: 1px solid #2ed981;
color: #2ed981;
}
}
.select {
width: 300rpx;
}
}
.uni-date {
flex: 0;
width: 65%;
}
.popup-center {
display: flex;
justify-content: space-between;
}
.popup-title {
display: flex;
justify-content: space-between;
border-bottom: 1px solid #e6e6e6;
padding: 30rpx 50rpx;
}
.popup-title-left {
font-size: 30rpx;
font-weight: 400;
color: 000;
font-family: PingFangSC-Medium;
}
.popup-body {
border-bottom: 1px solid #e6e6e6;
padding: 15rpx 50rpx;
color: #4c5359;
font-size: 30rpx;
}
.popup-box {
height: 500rpx;
overflow-y: scroll;
}
.liner-right-hotl {
display: flex;
}
.liner-del {
margin-top: 19rpx;
}
</style>
<template>
<view class=" conter-box">
<view class="box" v-if="props.trainProjectsList.length != 0">
<view class="text">培训科目</view>
<view class="box2">
<checkbox-group>
<view class="box-check" v-for="item in props.trainProjectsList" :key="item.id">
<view class="">
<view class="title">{{ item.projectName }}</view>
<view class="content">
{{ item.isNecessary == 1 ? '必选' : '非必选' }}&nbsp;&nbsp;合计:
<view class="span">{{ item.cost }}</view>
</view>
</view>
<view class="checkbox">
<checkbox
:disabled="item.isNecessary == 1"
:value="item.id"
@click="checkTrain(item)"
:checked="item.check"
/>
</view>
</view>
</checkbox-group>
</view>
</view>
<view class="box" v-if="props.examProjectsList.length != 0">
<view class="text">考试科目</view>
<view class="box2">
<checkbox-group>
<view class="box-check" v-for="item in props.examProjectsList" :key="item.id">
<view class="">
<view class="title">{{ item.projectName }}</view>
<view class="content">
{{ item.isNecessary == 1 ? '必选' : '非必选' }}&nbsp;&nbsp;合计:
<view class="span">{{ item.cost }}</view>
</view>
</view>
<view class="checkbox">
<checkbox
:disabled="item.isNecessary == 1"
:value="item.id"
@click="checkTrain(item)"
:checked="item.check"
/>
</view>
</view>
</checkbox-group>
</view>
</view>
</view>
<view class="foot">
<view class="button1" @click="upFN">上一步</view>
<view class="button" @click="nextFN">下一步</view>
</view>
<view class="nodata " v-if="props.examProjectsList.length == 0 && props.trainProjectsList.length == 0">
没有培训科目
</view>
</template>
<script setup>
import { forEach } from 'lodash';
import { ref, getCurrentInstance, reactive, toRefs } from 'vue';
const props = defineProps({
trainProjectsList: {},
examProjectsList: {},
hotelList: {},
id: {}
});
const data = reactive({
projectIdsArray: []
});
const examIdsArry = ref([]);
const { projectIdsArray } = toRefs(data);
const emit = defineEmits(['nextFN']);
const checkbox1 = ref([0]);
function checkTrain(item) {
if (item.isNecessary == 1) {
item.check = true;
} else {
item.check = !item.check;
}
}
// 上一步
function upFN() {
emit('nextFN', 0);
}
// 下一步
function nextFN() {
let falg = true;
let arr1 = [];
let arr2 = [];
props.examProjectsList.forEach(item => {
if (item.check) {
arr1.push(item.id);
}
});
props.trainProjectsList.forEach(item => {
if (item.check) {
arr2.push(item.id);
}
});
let examList = JSON.parse(JSON.stringify(props.examProjectsList));
let trainList = JSON.parse(JSON.stringify(props.trainProjectsList));
examList.concat(trainList).forEach(item => {
if (item.isNecessary == 1 && item.check == false) {
falg = false;
}
});
if (falg) {
examIdsArry.value = arr1;
projectIdsArray.value = arr2;
if (props.hotelList.length == 0) {
// 没有酒店直接报名
// 页面跳转
let path = `/pages/train/costBreakdown/costBreakdown?id=` + props.id;
wx.navigateTo({
url: path
});
} else {
emit('nextFN', 2, projectIdsArray.value, examIdsArry.value);
}
} else {
uni.showToast({
title: '请选择必选科目!',
duration: 2000,
icon: 'error'
});
return false;
}
}
</script>
<style scoped lang="scss">
.nodata {
background: url(/static/nodata.png) no-repeat;
background-size: 100%;
width: 100%;
height: 835rpx;
color: #aaa59f;
font-size: 50rpx;
}
.conter-box {
padding-bottom: 100rpx;
}
.box {
padding: 34rpx 25rpx;
background-color: #f4f6fa;
padding-bottom: 0;
.box2 {
background-color: #fff;
border-radius: 15rpx;
margin-top: 20rpx;
}
.text {
height: 29px;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500;
color: #000000;
line-height: 62rpx;
}
.box-check {
padding: 40rpx;
display: flex;
justify-content: space-between;
border-bottom: 1rpx solid #e6e6e6;
padding-bottom: 20rpx;
:deep(.checkbox__inner) {
background-color: #d9d9d9 !important;
border-color: #d9d9d9 !important;
border-radius: 50% !important;
width: 45rpx !important;
height: 45rpx !important;
line-height: 40rpx;
}
.text {
font-size: 12px;
color: #666;
margin-top: 5px;
}
.title {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
color: #2b3133;
margin-bottom: 10rpx;
}
.content {
display: flex;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
color: #2b3133;
.span {
color: #ff8124;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
}
}
}
:deep(.checkbox__inner-icon) {
position: absolute !important;
top: 4px !important;
left: 7px !important;
color: #000 !important;
}
:deep(.uni-data-checklist .checklist-group .checklist-box) {
margin-right: 0;
}
}
.conter-button {
position: absolute;
left: 0;
bottom: 10rpx;
width: 100%;
display: flex;
justify-content: center;
.button {
height: 80rpx;
width: 500rpx;
text-align: center;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 80rpx;
background: linear-gradient(270deg, #54e1b9, #00caa6);
border-radius: 40rpx;
}
}
.foot {
display: flex;
background-color: #ffffff;
padding: 20rpx 0;
position: absolute;
left: 0;
bottom: 0;
width: 100%;
.button {
margin: 0 auto;
height: 80rpx;
width: 300rpx;
text-align: center;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 80rpx;
background: linear-gradient(270deg, #54e1b9, #00caa6);
border-radius: 40rpx;
}
.button1 {
margin: 0 auto;
height: 80rpx;
width: 300rpx;
text-align: center;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
line-height: 80rpx;
background: #fff;
border-radius: 40rpx;
border: 1px solid #2ed981;
color: #2ed981;
}
}
</style>
<template>
<view class="box">
<view class="liner" v-for="item in props.scheduleList" :key="item.id">
<view class="timer">
<uni-icons custom-prefix="iconfont" type="icon-ai253" color="#1ec886" size="20"></uni-icons>
&nbsp; {{ item.dayStr }} 10:00-12:00
</view>
<view class="conetr">{{ item.event }}</view>
<view class="data">
<uni-icons custom-prefix="iconfont" type="icon-loufangfangzi"></uni-icons>
{{ item.place }}
</view>
</view>
<view class="nodata" v-if="props?.scheduleList?.length == 0">你还没有日程安排</view>
</view>
</template>
<script setup>
import { ref, getCurrentInstance, reactive, toRefs } from 'vue';
const props = defineProps({
scheduleList: {}
});
</script>
<style scoped lang="scss">
.nodata {
background: url(/static/nodata.png) no-repeat;
background-size: 100%;
width: 100%;
height: 835rpx;
color: #aaa59f;
font-size: 50rpx;
}
.box {
padding-top: 25rpx;
.liner {
margin-bottom: 20rpx;
background-color: #fff;
border-radius: 15rpx;
padding: 20rpx;
}
.timer {
display: flex;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #1ec886;
}
.conetr {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
color: #2b3133;
margin: 25rpx 0;
}
.data {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #7b7f83;
}
}
</style>
<template>
<view class="big-box">
<view class="list-box">
<view class="image">
<image class="img" referrer="no-referrer|origin|unsafe-url" :src="porps.pic" mode="aspectFill"></image>
</view>
<view class="text">
<view class="text-title">{{ porps.title }}</view>
<view class="text-card color" v-if="porps.card == '报名中'">{{ porps.card }}</view>
<view class="text-card color1" v-if="porps.card == '进行中'">{{ porps.card }}</view>
<view class="text-card color2" v-if="porps.card == '即将开始'">{{ porps.card }}</view>
<view class="text-card color3" v-if="porps.card == '已结束'">{{ porps.card }}</view>
<view class="text-card color4" v-if="porps.card == '培训未开始'">{{ porps.card }}</view>
<view class="text-card color4" v-if="porps.card == '报名未开始'">{{ porps.card }}</view>
<view class="text-timer ">报名时间:{{ porps.timer }}</view>
</view>
</view>
<view class="hr"></view>
</view>
</template>
<script setup>
const porps = defineProps({
pic: {
type: String
},
title: {
type: String
},
card: {
type: String
},
timer: {
type: String
}
});
</script>
<style lang="scss">
.big-box {
width: 100%;
padding: 25rpx 0;
.hr {
width: 100%;
border-bottom: 1rpx solid #e5e5e5;
padding-top: 25rpx;
}
.list-box {
width: 100%;
height: 180rpx;
display: flex;
.image {
width: 270rpx;
height: 180rpx;
padding-right: 25rpx;
.img {
width: 270rpx;
height: 180rpx;
border-radius: 15rpx;
}
}
.text {
margin-left: 20rpx;
.text-title {
text-align: left;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
color: #000000;
}
.text-card {
font-size: 20rpx;
width: 110rpx;
height: 32rpx;
margin-top: 57rpx;
text-align: center;
font-family: PingFang SC;
font-weight: 400;
color: #ffffff;
border-radius: 16px 16px 16px 0px;
}
.color {
background: linear-gradient(270deg, #54e1b9, #00caa6);
}
.color1 {
background: linear-gradient(270deg, #be8efb, #a76df4);
}
.color2 {
background: linear-gradient(270deg, #fea449, #ffb95f);
}
.color3 {
background: linear-gradient(270deg, #d9d9d9, #bcbcbc);
}
.color4 {
background: linear-gradient(270deg, #40d8ee, #53a7f6);
}
.text-timer {
margin-top: 20rpx;
height: 23rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 400;
color: #7b7f83;
}
}
}
}
</style>
\ No newline at end of file
<template>
<view class="big-box">
<view class="list-box">
<view class="image">
<image
class="img"
referrer="no-referrer|origin|unsafe-url"
:src="porps.item.cover"
mode="aspectFill"
></image>
</view>
<view class="text">
<view class="text-title">{{ porps.item.trainName }}</view>
<view class="text-card color1" v-if="porps.item.statusStr == '审核通过'">
{{ porps.item.statusStr }}
</view>
<view class="text-card color2" v-if="porps.item.statusStr == '待审核'">
{{
porps.item.status == '0' && porps.item.payStatus == '0'
? porps.item.payStatusStr
: porps.item.statusStr
}}
</view>
<view class="text-card color3" v-if="porps.item.statusStr == '报名失败'">
{{ porps.item.statusStr }}
</view>
<view class="text-card color3" v-if="porps.item.statusStr == '审核拒绝'">
{{ porps.item.statusStr }}
</view>
<view class="text-card color4" v-if="porps.item.statusStr == '待支付'">{{ porps.item.statusStr }}</view>
<view class="text-card color4" v-if="porps.item.statusStr == '待提交'">{{ porps.item.statusStr }}</view>
<view class="text-card color5" v-if="porps.item.statusStr == '已取消'">{{ porps.item.statusStr }}</view>
</view>
</view>
<view class="hr"></view>
</view>
</template>
<script setup>
const porps = defineProps({
pic: {
type: String
},
title: {
type: String
},
card: {
type: String
},
timer: {
type: String
},
item: {}
});
</script>
<style lang="scss">
.big-box {
width: 100%;
padding: 25rpx 0;
.hr {
width: 100%;
border-bottom: 1rpx solid #e5e5e5;
padding-top: 25rpx;
}
.list-box {
width: 100%;
height: 180rpx;
display: flex;
.image {
width: 270rpx;
height: 180rpx;
padding-right: 25rpx;
.img {
width: 270rpx;
height: 180rpx;
border-radius: 15rpx;
}
}
.text {
margin-left: 20rpx;
.text-title {
text-align: left;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
color: #000000;
}
.text-card {
font-size: 20rpx;
width: 94rpx;
height: 32rpx;
margin-top: 57rpx;
text-align: center;
font-family: PingFang SC;
font-weight: 400;
color: #ffffff;
border-radius: 16px 16px 16px 0px;
}
.color1 {
background: linear-gradient(270deg, #54e1b9, #00caa6);
}
.color2 {
background: linear-gradient(270deg, #be8efb, #a76df4);
}
.color3 {
background: linear-gradient(90deg, #f83841, #f76d74);
}
.color4 {
background: linear-gradient(90deg, #fea449, #ffb95f);
}
.color5 {
background: linear-gradient(270deg, #d9d9d9, #bcbcbc);
}
}
}
}
</style>
<template>
<view class="box">
<view class="image"><img class="img" :src="form.activity.cover" mode="aspectFill" /></view>
<view class="nav">
<view class="nav-title">{{ form.activity.name }}</view>
<view class="nva-center">
<view class="nav-card color" v-if="state == '报名中'">{{ state }}</view>
<view class="nav-card color1" v-if="state == '进行中'">{{ state }}</view>
<view class="nav-card color2" v-if="state == '即将开始'">{{ state }}</view>
<view class="nav-card color3" v-if="form.activity.signStatus=='2'">报名已结束</view>
<view class="nav-card color4" v-if="form.activity.signStatus=='0'">报名未开始</view>
<view class="nav-card color4" v-if="state == '培训未开始'">{{ state }}</view>
</view>
<view class="date"> 培训时间:{{ form.activity.trainTimeRange }}</view>
<view class="date"> 联系人:{{ form.activity.personInCharge }}</view>
<view class="date"> 联系电话:{{ form.activity.contact }}</view>
<view class="date">培训相关条例<text class="text-primary" @click="downLoad(activity.signNoticeAttachmentUrl)">《报名须知》</text></view>
</view>
<view class="conter">
<!-- <uni-segmented-control
activeColor="#C5161E"
:current="current"
:values="items"
@clickItem="onClickItem"
styleType="text"
></uni-segmented-control> -->
<view class="content">
<view v-show="current === 0">
<view class="conter-middle">
<view class="text">组委会</view>
<view class="text-group">
<view class="date" v-html="form.activity.orgInfo"></view>
</view>
</view>
<view class="conter-bottom">
<view class="text">培训考试内容</view>
<view class="nav-bar" @click="trainFN('bottom')">
<view class="nav-bar-text">培训</view>
<view class="nav-bar-icon"><uni-icons type="forward"></uni-icons></view>
</view>
<view class="nav-bar" @click="examinationFN('bottom')">
<view class="nav-bar-text">考试</view>
<view class="nav-bar-icon"><uni-icons type="forward"></uni-icons></view>
</view>
</view>
</view>
<view v-show="current === 1"><trainnSchedule :scheduleList="scheduleList" /></view>
</view>
</view>
<view class="buttonBox" v-if="current == 0">
<view class="conter-button">
<view class="button" v-if="false" @click="registered()">已报名</view>
<view
class="button"
v-if="
state != 0 &&
state != 1 &&
state != 5 &&
signStatusStr != '报名结束' &&
signStatusStr != '报名未开始'
"
@click="applyFN()"
>
培训报名
</view>
<view class="info" v-if="signStatusStr == '报名结束'">报名结束</view>
<view class="info" v-if="signStatusStr == '等待审核'">已报名</view>
<view class="blue" v-if="signStatusStr == '报名未开始'">报名未开始</view>
</view>
</view>
<uni-popup ref="popup" background-color="#fff" @change="change">
<view class="popup-content" :class="{ 'popup-height': type === 'left' || type === 'right' }">
<view class="title">
<view class="titel-left">{{ text }}</view>
<view class="title-right" @click="shut">
<uni-icons class="icons" type="closeempty"></uni-icons>
</view>
</view>
<view class="popup-check" v-for="item in trainList" :key="item.id">
{{ item.name }}
</view>
</view>
</uni-popup>
</view>
</template>
<script setup>
import trainnSchedule from '@/training/components/trainSchedule/trainSchedule.vue';
import { onLoad, onReady, onShareAppMessage, onShareTimeline, onPullDownRefresh } from '@dcloudio/uni-app';
import { ref, getCurrentInstance, reactive, toRefs } from 'vue';
import * as train from '@/training/train.js';
const items = ref(['详情', '日程']);
const current = ref(0);
const show = ref(true);
const showMore = ref(false);
const popup = ref();
const state = ref();
const signStatusStr = ref();
const id = ref();
const userList = ref();
const type = ref('center');
const trainList = ref();
const text = ref();
const scheduleList = ref();
const height = ref();
const flag = ref(true);
const status = ref();
const tiem = ref(new Date().getTime());
const newTime = ref();
const data = reactive({
form: {}
});
const { form } = toRefs(data);
onLoad(option => {
id.value = option.trainId;
initData();
});
function filterTime(num) {
if (num) return num.slice(0, 16);
}
// 获取详情数据
function initData() {
train.getTrainDetail(id.value).then(res=>{
form.value = res.data;
signStatusStr.value = res.data.signStatusStr;
state.value = res.data.signStatus;
newTime.value = new Date(res.data.enrollEndTime).getTime();
userList.value = res.data.userList[0];
scheduleList.value = res.data.scheduleList;
setTimeout(() => {
getbox();
}, 50);
})
}
function change(e) {
show.value = e.show;
}
// 培训
function trainFN(val) {
text.value = '培训';
popup.value.open(val);
trainList.value = form.value.subjectTrainList;
}
// 考试
function examinationFN(val) {
text.value = '考试';
popup.value.open(val);
trainList.value = form.value.examVoList;
}
// 分段器
function onClickItem(e) {
if (current.values != e.currentIndex) {
current.value = e.currentIndex;
}
}
// 已报名
function registered() {
uni.showToast({
title: '已报名,请不要重复报名!',
duration: 2000,
icon: 'error'
});
return false;
}
// 获取容器高度
function getbox() {
const query = wx.createSelectorQuery();
query
.select('.text-content')
.boundingClientRect(function(rect) {
height.value = rect.height;
if (rect.height > 60) {
showMore.value = true;
} else {
showMore.value = false;
}
})
.exec();
}
// 查看更多与收起
function getShow() {
if (height.value > 60) {
// 显示查看更多
showMore.value = true;
// 固定容器高度
} else {
// 隐藏查看更多
showMore.value = false;
}
}
// 点击查看更多
const move = () => {
// 1.文字 icon 转换
// 2.容器高度自适应
flag.value = !flag.value;
if (!flag.value) {
height.value = undefined;
} else {
height.value = 60;
}
};
function applyFN() {
let path = '/pages/train/apply/apply?data=' + [id.value, status.value];
wx.redirectTo({
url: path
});
}
// 关闭弹框
function shut() {
popup.value.close();
}
function downLoad(url){
}
</script>
<style lang="scss" scoped>
.date{font-size: 26rpx;color: #999;}
.box {
background-color: #f7f8fa;
.image {
padding: 25rpx;
height: 320rpx;
background: #fff;
border-radius: 15rpx;
.img {
width: 100%;
height: 320rpx;
border-radius: 15rpx;
}
}
.nav {
padding: 30rpx 25rpx;
background-color: #fff;
.nav-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #000000;
}
.nva-center {
display: flex;
margin-top: 25rpx;
margin-bottom: 25rpx;
.nav-card {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 400;
color: #ffffff;
text-align: center;
height: 32rpx;
width: 94rpx;
line-height: 32rpx;
border-radius: 16rpx 16rpx 16rpx 0rpx;
}
.color {
background: linear-gradient(270deg, #54e1b9, #00caa6);
}
.color1 {
background: linear-gradient(270deg, #be8efb, #a76df4);
}
.color2 {
background: linear-gradient(270deg, #fea449, #ffb95f);
}
.color3 {
background: linear-gradient(270deg, #d9d9d9, #bcbcbc);
}
.color4 {
background: linear-gradient(270deg, #40d8ee, #53a7f6);
}
.nav-timer {
margin-left: 13rpx;
height: 23rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 400;
color: #7b7f83;
line-height: 56rpx;
}
}
}
.buttonBox {
background-color: #fff;
width: 100%;
.conter-button {
width: 100%;
background-color: #fff;
margin-top: 30rpx;
padding: 10rpx 0;
.button {
margin: 0 auto;
height: 80rpx;
width: 500rpx;
text-align: center;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 80rpx;
background: linear-gradient(270deg, #54e1b9, #00caa6);
border-radius: 40rpx;
}
.info {
margin: 0 auto;
height: 80rpx;
width: 500rpx;
text-align: center;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 80rpx;
background: linear-gradient(270deg, #d9d9d9, #bcbcbc);
border-radius: 40rpx;
}
.blue {
margin: 0 auto;
height: 80rpx;
width: 500rpx;
text-align: center;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 80rpx;
background: linear-gradient(270deg, #40d8ee, #53a7f6);
border-radius: 40rpx;
}
}
}
// 分段器
.conter {
.conter-top {
margin-top: 14rpx;
min-height: 250rpx;
padding: 25rpx;
background-color: #fff;
border-radius: 15rpx;
.more {
height: 200rpx !important;
overflow: hidden;
}
.examine {
display: flex;
justify-content: center;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 400;
color: #1ec886;
}
// 点击加载更多
.text {
height: 29rpx;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500;
color: #000000;
line-height: 36rpx;
text-align: left;
padding-bottom: 30rpx;
border-bottom: 1rpx solid #eee;
margin-bottom: 20rpx;
}
// 超出3行将隐藏
.hidden {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
line-height: 40rpx; //行高方便计算
}
.text-content {
overflow: hidden;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #4c5359;
word-break: break-all;
line-height: 40rpx;
text-align: left;
}
.uni-list-item {
border-bottom-style: solid;
border-bottom-width: 1px;
border-bottom-color: #eee;
font-size: 14px;
}
.uni-list-item__container {
/* #ifndef APP-NVUE */
display: flex;
width: 100%;
box-sizing: border-box;
/* #endif */
padding: 12px 15px;
flex: 1;
position: relative;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.uni-list-item__content-title {
font-size: 14px;
color: #666;
}
}
.conter-middle {
padding: 25rpx;
background-color: #fff;
border-radius: 15rpx;
margin-top: 25rpx;
.text {
height: 29rpx;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500;
color: #000000;
line-height: 36rpx;
text-align: left;
padding-bottom: 30rpx;
border-bottom: 1rpx solid #eee;
margin-bottom: 20rpx;
}
.text-group {
display: flex;
.text-g-left {
height: 48rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #4c5359;
line-height: 48rpx;
}
.text-g-right {
height: 48rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #2b3133;
line-height: 48rpx;
}
}
}
.conter-bottom {
height: 217rpx;
padding: 25rpx;
background-color: #fff;
border-radius: 15rpx;
margin-top: 25rpx;
.text {
height: 29rpx;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500;
color: #000000;
line-height: 36rpx;
text-align: left;
padding-bottom: 30rpx;
border-bottom: 1rpx solid #eee;
}
.nav-bar {
display: flex;
justify-content: space-between;
padding-bottom: 30rpx;
padding-top: 20rpx;
border-bottom: 1rpx solid #eee;
.nav-bar-text {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #2b3133;
}
.nav-bar-icon {
font-size: 28rpx;
color: #95a1a6;
}
}
}
.segmented-control__text {
font-size: 26rpx !important;
font-family: PingFang SC !important;
font-weight: 400 !important;
color: #4c5359 !important;
}
.segmented-control__item--text {
border-bottom: 4rpx solid #54e1b9;
font-size: 30rpx !important;
font-family: PingFang SC !important;
font-weight: 500 !important;
color: #2b3133 !important;
}
width: 100%;
.example-body {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
padding: 0;
}
.uni-common-mt {
margin-top: 30rpx;
}
.uni-padding-wrap {
padding: 0px 30rpx;
}
.content {
padding: 0 30rpx;
}
.content-text {
font-size: 14rpx;
color: #666;
}
.color-tag {
width: 25rpx;
height: 25rpx;
}
.uni-list {
flex: 1;
}
.uni-list-item {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex: 1;
flex-direction: row;
background-color: #ffffff;
}
.uni-list-item__container {
padding: 12px 15px;
width: 100%;
flex: 1;
position: relative;
/* #ifndef APP-NVUE */
display: flex;
box-sizing: border-box;
/* #endif */
flex-direction: row;
justify-content: space-between;
align-items: center;
border-bottom-style: solid;
border-bottom-width: 1px;
border-bottom-color: #eee;
}
.uni-list-item__content-title {
font-size: 14px;
}
}
.popup-content {
padding: 50rpx !important;
min-height: 500rpx;
border-top-left-radius: 30rpx;
border-top-right-radius: 30rpx;
.title {
display: flex;
justify-content: space-between;
.titel-left {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500;
color: #000000;
}
.title-right {
.uni-icons {
font-size: 60rpx !important;
color: #5a5a5a !important;
}
}
}
.popup-check {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
color: #4c5359;
border-top: 1rpx solid #e6e6e6;
padding-top: 35rpx;
padding-bottom: 35rpx;
}
}
}
</style>
import request from '@/common/request.js'
const accountInfo = uni.getAccountInfoSync()
const appId = accountInfo.miniProgram.appId;
// 获取培训列表
export function getTrainList(params) {
return request({
url: `/webPc/getTrains`,
method: 'get',
params: params
})
}
// 查看培训项目
export function getTrainDetail(id) {
return request({
url: '/webPc/getTrainDetails',
method: 'get',
params: {id}
})
}
// 查看培训项目
export function trainProjectList(params) {
return request({
url: '/systemj/information/projectList',
method: 'get',
params: params
})
}
// 查看报名费用(未支付前)
export function searchTrainCost(params) {
return request({
url: '/systemj/signer/getEnrollBill',
method: 'get',
params: params
})
}
// 提交 用户资料
export function trainNext(params) {
return request({
url: `/systemj/signer/signUp`,
method: 'post',
params,
})
}
// 生成订单
export function createOrder(params) {
return request({
url: `/systemj/order/saveOrder`,
method: 'post',
params,
})
}
//会员支付
export function pay(params) {
return request({
url: `/systemj/order/pay`,
method: 'post',
params,
})
}
// 线下支付银行信息
export function bankSlip(params) {
return request({
url: `/systemj/order/bankInfo`,
method: 'get',
params,
})
}
export function trainOrder(params) {
return request({
url: `/systemj/order/getMyOrders`,
method: 'get',
params,
})
}
// 修改报名
export function trainUpdata(params) {
return request({
url: `/systemj/signer/updateSign`,
method: 'put',
params,
})
}
// 取消订单
export function cancelOrder(params) {
return request({
url: `/systemj/order/cancelOrder`,
method: 'put',
params,
})
}
// 报项列表
export function signList(params) {
return request({
url: `/systemj/signer/applets/signList`,
method: 'get',
params,
})
}
// 报项详情
export function signDetail(params) {
return request({
url: `/systemj/signer/applets/signDetail`,
method: 'get',
params,
})
}
// 订单列表
export function orderList(params) {
return request({
url: `/systemj/order/applets/orderList`,
method: 'get',
params,
})
}
// 订单详情
export function getOrderDetail(params) {
return request({
url: `/systemj/order/getOrderDetail`,
method: 'get',
params,
})
}
<template>
<view class="box">
<view class="title">
<view class="navSerch">
<view class="serch">
<uni-search-bar class="uni-mt-10" radius="30" placeholder="搜索" clearButton="auto" Button="none"
cancelText="" v-model="name" bgColor="#F4F6FA" @confirm="search" @blur="blur" @clear="clear" />
</view>
</view>
<view class="searchLeft">
</view>
</view>
<view>
<view class="nav-box">
<view class="nav-ul">
<view class="nva-li" @click="nvaText(index)" :class="{nt:Nindex==index}"
v-for="(item,index) in items" :key="index">
{{item}}
</view>
</view>
</view>
<view class="content">
<view class="taber">
<view v-for="item in list" :key="item.trainId" @click="detail(item)">
<uniList :pic="config.baseUrl_api + item.cover" :title="item.name" :card="item.trainStatusStr"
:timer="filterTime(item.signTimeRange) "></uniList>
</view>
</view>
</view>
<view><uni-load-more :status="status" :content-text="contentText" /></view>
</view>
</view>
</template>
<script setup>
import config from '@/config.js'
import uniList from '@/training/components/ulist/ulist';
import * as train from '@/training/train.js';
import {
onLoad,
onReady,
onShareAppMessage,
onShareTimeline,
onPullDownRefresh,
onReachBottom
} from '@dcloudio/uni-app';
import {
ref,
getCurrentInstance,
reactive,
toRefs
} from 'vue';
const searchValue = ref();
const items = ref(['全部', '报名中', '培训进行中', '已结束']);
const current = ref(0);
const name = ref();
const Nindex = ref(0)
const range = ref([{
value: 1,
text: '全部'
},
{
value: 2,
text: '报名中'
},
{
value: 3,
text: '进行中'
},
{
value: 4,
text: '即将开始'
},
{
value: 5,
text: '报名未开始'
},
{
value: 6,
text: '培训未开始'
},
{
value: 7,
text: '已结束'
}
]);
const list = ref();
const total = ref();
// noMore没有更多了
// loading加载中
// more下来加载
const status = ref('more');
const flag = ref();
const data = reactive({
query: {
flag: '',
pageSize: 10,
pageNum: 1
},
contentText: {
contentdown: '',
contentrefresh: '加载中',
contentnomore: '没有更多'
}
});
const {
query,
contentText
} = toRefs(data);
// 加载培训列表数据
onLoad(option => {
initData();
});
function initData() {
query.value.flag = current.value;
train.getTrainList(query.value).then(res=>{
list.value = res.rows;
total.value = res.rows;
})
}
// 详情页
function detail(item) {
let path = `/training/detailPage?trainId=${item.id}`;
uni.navigateTo({
url: path
});
}
function nvaText(index) {
Nindex.value = index
current.value = index
initData()
console.log(index);
}
function filterTime(num) {
if (num) return num.slice(0, 16)
}
// 下拉框
function change(e) {
if (e) {
addForm.value.flag = e - 1;
current.value = e - 1;
Nindex.value = e - 1
console.log(e);
initData();
}
}
// 搜索
function search(res) {
if (res.value != '') {
addForm.value.trainName = res.value;
initData();
}
}
// 搜索清空按钮
function clear(res) {
addForm.value.trainName = '';
initData();
}
// 下来刷新
onPullDownRefresh(() => {
addForm.value.flag = 0;
initData();
wx.stopPullDownRefresh();
});
// 上拉加载
onReachBottom(async () => {
if (list.value.length == total.value) {
status.value = 'noMore';
return false;
} else {
status.value = 'loading';
addForm.value.pageNum += 1;
let res = await train.getTrainList(addForm.value);
let arr = res.rows;
list.value = list.value.concat(arr);
total.value = res.total;
status.value = 'noMore';
}
});
</script>
<style lang="scss">
.uni-section-header {
display: none !important;
}
.box {
background-color: #fff;
}
.nav-box {
overflow-x: scroll;
}
.nav-ul {
display: flex;
justify-content: space-around;
width: 100%;
}
.nva-li {
font-size: 26rpx;
padding: 10rpx 0rpx;
margin: 0 15rpx;
}
.nt {
font-size: 30rpx;
font-weight: 400;
border-bottom: 4rpx solid #AD181F;
}
.taber {
width: 100%;
padding: 25rpx 30rpx;
padding-bottom: 0;
}
.segmented-control__text {
font-size: 26rpx !important;
font-family: PingFang SC !important;
font-weight: 400 !important;
color: #4c5359 !important;
}
.segmented-control__item--text {
border-bottom: 4rpx solid #54e1b9;
font-size: 30rpx !important;
font-family: PingFang SC !important;
font-weight: 500 !important;
color: #2b3133 !important;
}
.title {
display: flex;
justify-content: space-between;
.navSerch {
width:100%;height:100rpx;flex:1 1 auto;
position: relative;
.serch {
width:100%;
}
}
.searchLeft {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 400;
color: #000000;
margin-top: 25rpx;
display: flex;
}
.uni-searchbar__cancel {
display: none;
}
:deep(.uni-select) {
border: 0;
// padding-left: 20rpx;
}
:deep(.uni-select__input-text) {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 400;
color: #000000;
margin-right: 14rpx;
width: 110rpx;
text-align: right;
}
:deep(.uni-select__selector-item) {
// padding: 0 auto;
text-align: center;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 400;
color: #000000;
}
}
// 搜索框
.search-result {
padding-top: 10rpx;
padding-bottom: 20rpx;
text-align: center;
}
.search-result-text {
text-align: center;
font-size: 14rpx;
color: #666;
}
:deep(.uni-searchbar) {box-sizing: border-box;
}
.uni-searchbar__box {
padding-right: 0rpx !important;
}
.example-body {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
padding: 0px;
}
.uni-mt-10 {
width: 600rpx;
}
// 分段器
.example-body {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
padding: 0;
}
.uni-common-mt {
margin-top: 30rpx;
}
.uni-padding-wrap {
// width: 750rpx;
padding: 0rpx 30rpx;
}
.content {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
justify-content: center;
// height: 1235rpx;
text-align: center;
}
.content-text {
font-size: 14rpx;
color: #666;
}
.color-tag {
width: 25rpx;
height: 25rpx;
}
.uni-list {
flex: 1;
}
.uni-list-item {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex: 1;
flex-direction: row;
background-color: #ffffff;
}
.uni-list-item__container {
padding: 12rpx 15rpx;
width: 100%;
flex: 1;
position: relative;
/* #ifndef APP-NVUE */
display: flex;
box-sizing: border-box;
/* #endif */
flex-direction: row;
justify-content: space-between;
align-items: center;
border-bottom-style: solid;
border-bottom-width: 1rpx;
border-bottom-color: #eee;
}
.uni-list-item__content-title {
font-size: 14rpx;
}
.chat-custom-right {
flex: 1;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
justify-content: space-between;
align-items: flex-end;
}
.chat-custom-text {
font-size: 12rpx;
color: #999;
}
</style>
\ No newline at end of file
......@@ -347,6 +347,7 @@
flex-direction: row;
flex-wrap: nowrap;
padding: 0 5px;
justify-content: flex-end;
}
.selected-item {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!