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
......
......@@ -669,6 +669,13 @@ function groupWithDraw(data) {
method: 'post',
params: data
})
}
function certifiedwithDraw(data) {
return request({
url: `/member/certified/withDraw`,
method: 'post',
params:data
})
}
// 省合并缴费通知单
function mergePayMentApi(data) {
......@@ -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,
......@@ -1030,5 +1044,6 @@ export {
getMemberInfoModRange,commitGroupChange,delGroupChange,
getChangeGroupByRangeId,groupInfoMod,addGroupInfoModeToRange,
groupChangeEditMod,groupChangeAudit,extractInfoFromChinaIdCard
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>
......@@ -193,6 +196,45 @@
uni.redirectTo({
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>
......
......@@ -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
......
......@@ -21,7 +21,8 @@
<uni-list-item title="详细地址" :rightText="form.address||'--'"/>
</uni-list>
</view>
</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">
<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>
<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)">
<view class="flexbox">
<view class="photobox">
<image class="photo" v-if="n.photo" :src="n.photo" mode='aspectFill'></image>
<view class="colorful" v-else>{{n.name.slice(0,1)}}</view>
</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)">
<view class="flexbox">
<view class="photobox">
<image class="photo" v-if="n.photo" :src="n.photo" mode='aspectFill'></image>
<view class="colorful" v-else>{{n.name.slice(0,1)}}</view>
</view>
<view>
{{n.name}} ({{n.perCode}})
</view>
</view>
<view>
{{n.name}} ({{n.perCode}})
<view class="flexbox">
<text v-if="n.certStage==0" class="text-primary">
新会员
</text>
<text v-if="n.certStage==1" class="text-warning">
待提交
</text>
<text v-if="n.certStage==2" class="text-red">
缴费中
</text>
<text v-if="n.certStage==3" class="text-success">
正常
</text>
<text v-if="n.certStage==4" class="text-gray">
过期
</text>
</view>
</view>
<view class="flexbox">
<text v-if="n.certStage==0" class="text-primary">
新会员
</text>
<text v-if="n.certStage==1" class="text-warning">
待提交
</text>
<text v-if="n.certStage==2" class="text-red">
缴费中
</text>
<text v-if="n.certStage==3" class="text-success">
正常
</text>
<text v-if="n.certStage==4" class="text-gray">
过期
</text>
</view>
</view>
<template v-slot:right>
<view class="slot-button">
<!-- <view class="edit-button" @click="handleUpdate(n)">
<uni-icons type="compose" color="#fff" size="20"></uni-icons>
<text class="slot-button-text">编辑</text>
</view> -->
<view class="danger-button" v-if="n.certStage==0" @click="handleDelete(n)">
<uni-icons type="trash" color="#fff" size="20"></uni-icons>
<text class="slot-button-text">删除</text>
</view>
</view>
</template>
</uni-swipe-action-item>
</uni-swipe-action>
<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>
<template v-slot:right>
<view class="slot-button">
<!-- <view class="edit-button" @click="handleUpdate(n)">
<uni-icons type="compose" color="#fff" size="20"></uni-icons>
<text class="slot-button-text">编辑</text>
</view> -->
<view class="danger-button" v-if="n.certStage==0" @click="handleDelete(n)">
<uni-icons type="trash" color="#fff" size="20"></uni-icons>
<text class="slot-button-text">删除</text>
</view>
</view>
</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>
</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=" 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>
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!