master
lion 1 year ago
parent 6d2da300f4
commit af0e0e82a1

@ -28,7 +28,8 @@ let apiApp = {
// 其他
otherConfig: '/api/mobile/other/config',
otherBanner: '/api/mobile/other/banner',
otherUploadFile: '/api/mobile/upload-file',
otherUploadFile: '/api/mobile/upload-file',
getparameter:'/api/admin/parameter/show'
}
@ -65,7 +66,17 @@ const install = (Vue, vm) => {
// 其他
let otherConfig = (params = {}) => vm.$u.get(apiApp.otherConfig, params);
let otherBanner = (params = {}) => vm.$u.get(apiApp.otherBanner, params);
let otherUploadFile = (params = {}) => vm.$u.post(apiApp.otherUploadFile, params);
let otherUploadFile = (params = {}) => vm.$u.post(apiApp.otherUploadFile, params);
let getparameter = (params = {}) => vm.$u.get(apiApp.getparameter, params);
// export function getparameter(param, loading = true) {
// return request({
// url: '/api/admin/parameter/show',
// method: 'get',
// params: param,
// paramsSerializer: customParamsSerializer,
// isLoading: loading
// })
// }
// 将各个定义的接口名称统一放进对象挂载到vm.$u.api(因为vm就是this也即this.$u.api)下
vm.$u.api = {
@ -97,7 +108,8 @@ const install = (Vue, vm) => {
// 其他
otherConfig,
otherBanner,
otherUploadFile,
otherUploadFile,
getparameter:getparameter
};
}

@ -191,18 +191,16 @@
}
.form-btn {
width: 100%;
// position: fixed;
// left: 0;
// bottom: 0;
padding: 20rpx 0;
&>view{
position: relative;
padding: 60rpx 0;
&>view {
width: 70%;
text-align: center;
margin: 0 auto;
color: #fff;
background-color: #010296;
border-radius: 10rpx;
background: linear-gradient(to right, #5e5fbc, #0d0398);
border-radius: 30rpx;
padding: 20rpx;
}
}

@ -0,0 +1,235 @@
<template>
<div>
<div class="plate" :class="{show:show}">
<div :class="['item',{active:index===0}]" @click.stop="handleChange(0)">{{plate[0]}}</div>
<div :class="['item ml10',{active:index===1}]" @click="handleChange(1)">{{plate[1]}}</div>
<div style=" font-size: 16rpx; padding: 0rpx 8rpx;"></div>
<div :class="['item',{active:index===2}]" @click="handleChange(2)">{{plate[2]}}</div>
<div :class="['item ml10',{active:index===3}]" @click="handleChange(3)">{{plate[3]}}</div>
<div :class="['item ml10',{active:index===4}]" @click="handleChange(4)">{{plate[4]}}</div>
<div :class="['item ml10',{active:index===5}]" @click="handleChange(5)">{{plate[5]}}</div>
<div :class="['item ml10',{active:index===6}]" @click="handleChange(6)">{{plate[6]}}</div>
<div :class="['item ml10 column',{active:index===7}]" @click="handleChange(7)">
<template v-if="newEnergy">
<text>{{plate[7]}}</text>
</template>
<template v-else>
<u-icon name="plus-circle"></u-icon>
<div style="font-size: 20upx;">新能源</div>
</template>
</div>
</div>
<section class="panel" :class="{show:show}">
<div class="header">
<div class="p24" @click="panelReset"></div>
<!-- <img src="/static/img/down.png" style="width: 140upx;" mode="widthFix" @click="panelHide" /> -->
<div class="p24" @click="panelHide"></div>
</div>
<div class="panelList clearfix">
<div class="item" v-for="(item,index) of currentDatas" @click.stop="clickKeyBoard(item)">{{item}}</div>
</div>
<div class="backspace shadow" @click="backspace">
<u-icon name="backspace" color="#333" size="34"></u-icon>
</div>
</section>
</div>
</template>
<script>
export default {
name: "index",
props: {
characterDatas: {
type: Array,
default () {
return [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N',
'P', 'Q',
'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '港', '澳', '学', '领','新'
]
}
},
areaDatas: {
type: Array,
default () {
return ['京', '沪', '粤', '津', '冀', '晋', '蒙', '黑', '吉', '辽', '苏', '浙', '皖', '闽', '赣', '鲁', '豫', '鄂', '湘',
'桂',
'琼', '渝', '川', '贵', '云', '藏',
'陕', '甘', '青', '宁', '新', '临', '领', '警', '学', '港', '澳'
]
}
},
defaultPlate: {
type: Array,
default () {
return Array.from({
length: 8
}, v => '')
}
}
},
data() {
return {
show: false,
index: -1,
newEnergy: false,
plate: this.defaultPlate
}
},
created() {
},
computed: {
currentDatas() {
return this.index === 0 ? this.areaDatas : this.characterDatas;
}
},
watch: {
plate(value) {
this.$emit("listenPlateChange", value);
}
},
methods: {
panelShow() {
this.show = true;
},
panelHide() {
this.show = false;
},
handleChange(index) {
this.index = index;
if (index === 7) {
this.newEnergy = true;
}
this.panelShow();
},
clickKeyBoard(item) {
console.log(item)
if (this.index < 7 || this.newEnergy) {
this.$set(this.plate, this.index, item);
}
if (this.index < 7) {
this.index++;
}
},
backspace() {
if (this.index > 0) {
this.$set(this.plate, this.index, '');
this.index--;
}
},
panelReset() {
this.index = 0;
this.plate = Array.from({
length: 8
}, v => '');
this.newEnergy = false;
},
}
}
</script>
<style scoped lang='scss'>
.plate {
display: flex;
align-items: center;
justify-content: center;
.item {
width: 66upx;
height: 66upx;
background-color: #fffbe9;
border: 1px solid #0d0398;
border-radius: 10upx;
display: flex;
align-items: center;
justify-content: center;
&.ml10 {
margin-left: 10upx;
}
&.column {
flex-direction: column;
}
&.active {
background-color: #0d0398;
color:#fff
}
}
}
.panel {
position: fixed;
left: 0;
width: 100%;
bottom: 0;
z-index: 999;
box-sizing: border-box;
background-color: #cfd0d5;
transition: all 0.3s ease;
transform: translateY(100%);
.p24 {
padding: 24upx;
}
&.show {
transform: translateX(0);
}
.header {
display: flex;
align-items: center;
justify-content: space-between;
height: 80upx;
border-top: 1px solid #c9cacd;
border-bottom: 1px solid #c9cacd;
}
.panelList {
padding-top: 20upx;
padding-left: 16upx;
text-align: center;
.item {
float: left;
width: 62upx;
height: 84upx;
background: #fff;
border-radius: 10upx;
line-height: 84upx;
margin-right: 10upx;
margin-bottom: 10upx;
font-size: 32upx;
font-weight: bold;
box-shadow: 0 0 8px 1px #e5e5e5;
}
}
.backspace {
position: absolute;
bottom: 10upx;
right: 22upx;
width: 100upx;
height: 84upx;
background-color: #adb2bc;
border-radius: 10upx;
display: flex;
align-items: center;
justify-content: center;
}
}
.clearfix::before,
.clearfix::after {
content: ' ';
display: table;
height: 0;
line-height: 0;
visibility: hidden;
clear: both;
}
</style>

@ -44,8 +44,8 @@
height: 48,
"text": "课程中心",
"pagePath": "/pages/course/index",
"iconPath": require("@/static/index_icon1.png"),
"selectedIconPath": require("@/static/index_icon1.png")
"iconPath": require("@/static/index_icon1-2.png"),
"selectedIconPath": require("@/static/index_icon1-2.png")
},
{
id: 2,
@ -54,8 +54,8 @@
height: 48,
"text": "校友权益",
"pagePath": "/pages/book/index",
"iconPath": require("@/static/index_icon1.png"),
"selectedIconPath": require("@/static/index_icon1.png")
"iconPath": require("@/static/index_icon1-3.png"),
"selectedIconPath": require("@/static/index_icon1-3.png")
},
{
id: 3,
@ -64,8 +64,8 @@
height: 48,
"text": "我的",
"pagePath": "/pages/me/index",
"iconPath": require("@/static/index_icon1.png"),
"selectedIconPath": require("@/static/index_icon1.png")
"iconPath": require("@/static/index_icon1-4.png"),
"selectedIconPath": require("@/static/index_icon1-4.png")
},
]
};

@ -0,0 +1,105 @@
<template>
<view class="container-swiper">
<swiper @change="changeCurrent" circular :current="current_swiper" :autoplay="false">
<swiper-item v-for="item in banner_list" @click="toCourse(item)">
<image :src="item.image?item.image.url:''" />
<!-- <view class="course_name">{{item.name}}</view> -->
</swiper-item>
</swiper>
<view class="container-swiper_current">
<image src="../static/index_swiper_left.png" alt="" />
<text class="bigFont">{{show_current_swiper}}</text>
<text>/{{banner_list.length}}</text>
<image src="../static/index_swiper_right.png" alt="" />
</view>
</view>
</template>
<script>
export default {
name: "topBanner",
props:{
banner_list:{
type:Array,
default:[]
}
},
data() {
return {
current_swiper: 0,
show_current_swiper: 1,
};
},
onLoad() {
},
methods:{
changeCurrent(e) {
this.show_current_swiper = e.detail.current + 1
},
toCourse(item){
uni.switchTab({
url:item.jump_url
})
}
}
}
</script>
<style scoped lang="scss">
.container-swiper {
width: 680rpx;
margin: 0 auto;
font-size: 0;
margin-top: 30rpx;
position: relative;
z-index: 99;
swiper {
width: 100%;
height: 380rpx;
swiper-item {
image {
width: 100%;
height: 100%;
}
}
}
.course_name {
font-size: 32rpx;
color: #ba9676;
position: absolute;
top: 20rpx;
left: 20rpx;
}
&_current {
font-size: 28rpx;
text-align: center;
color: #333333;
display: flex;
align-items: center;
justify-content: center;
margin-top: 28rpx;
image {
width: 28rpx;
height: 11rpx;
margin: 0 20rpx;
}
text {
margin-top: 10rpx;
}
.bigFont {
color: #b08c6c;
font-size: 40rpx;
margin-top: 0rpx;
margin-right: 10rpx;
}
}
}
</style>

@ -3,17 +3,29 @@
<image class="cbg" src="../../static/common_bg.png"></image>
<!-- <u-divider>个人信息</u-divider> -->
<view class="wrap">
<u-form :model="form" :label-width="140" ref="uForm" :label-align="'left'" error-type="toast">
<u-form-item label="姓名" prop="name" required><u-input v-model="form.username" /></u-form-item>
<u-form-item label="性别" prop="sex" required><u-input @click="showSex = true" v-model="form.sex"
<u-form :model="form" :label-width="140" ref="uForm" :label-align="'left'" :error-type="['message']">
<u-form-item label="姓名" prop="username" required>
<u-input v-model="form.username" placeholder="请输入姓名" />
</u-form-item>
<u-form-item label="性别" prop="sex" required>
<u-input @click="showSex = true" placeholder="请选择性别" v-model="form.sex" type="select" />
</u-form-item>
<u-form-item label="身份证号" prop="idcard" required>
<u-input type="idcard" placeholder="请输入身份证号" v-model="form.idcard" /></u-form-item>
<u-form-item label="联系方式" prop="mobile" required>
<u-input type="number" placeholder="请输入联系方式" v-model="form.mobile" />
</u-form-item>
<u-form-item label="出生日期" prop="birthday" required>
<u-input @click="dateShow=true" placeholder="请选择出生日期" v-model="form.birthday"
type="select" /></u-form-item>
<u-form-item label="身份证号" prop="idcard" required><u-input type="idcard"
v-model="form.idcard" /></u-form-item>
<u-form-item label="手机号码" prop="mobile" required><u-input type="number"
v-model="form.mobile" /></u-form-item>
<u-form-item label="公司名称" prop="company_name"><u-input v-model="form.company_name" /></u-form-item>
<u-form-item label="职务" prop="company_position"><u-input
v-model="form.company_position" /></u-form-item>
<u-form-item label="邮箱" prop="email" required>
<u-input v-model="form.email" placeholder="请输入邮箱" /></u-form-item>
<u-form-item label="公司名称" prop="company_name">
<u-input v-model="form.company_name" placeholder="请输入公司名称" />
</u-form-item>
<u-form-item label="职务" prop="company_position">
<u-input @click="showPosition = true" v-model="form.company_position" type="select"
placeholder="请选择职务" /></u-form-item>
</u-form>
<!-- <u-divider>报名信息</u-divider> -->
<applyForm ref="applyForm" @backForm="backForm" :course_forms="course_forms"></applyForm>
@ -23,6 +35,10 @@
<view @click="submit" type="primary">提交</view>
</view> -->
<u-picker @confirm="selectSex" v-model="showSex" :range="sexList" range-key="value" mode="selector"></u-picker>
<u-picker @confirm="dateConfirm" mode="time" v-model="dateShow" :params="dateParams"></u-picker>
<u-picker @confirm="selectPosition" v-model="showPosition" :range="positionList" range-key="value"
mode="selector"></u-picker>
</view>
</template>
@ -35,6 +51,17 @@
data() {
return {
course_id: '',
showPosition: false,
positionList: [],
dateShow: false,
dateParams: {
year: true,
month: true,
day: true,
hour: false,
minute: false,
second: false
},
form: {},
apply_form: [],
course_forms: [],
@ -50,13 +77,52 @@
username: [{
required: true,
message: '请输入姓名',
trigger: ['change', 'blur'],
trigger: ['blur'],
}],
sex: [{
required: true,
message: '请选择性别',
trigger: ['change', 'blur'],
}],
birthday: [{
required: true,
message: '请选择出生日期',
trigger: ['change', 'blur'],
}],
mobile: [{
required: true,
message: '请输入联系方式',
trigger: ['blur'],
}, {
validator: (rule, value, callback) => {
return this.$u.test.mobile(value);
},
message: '手机号码不正确',
trigger: ['blur'],
}],
idcard: [{
required: true,
message: '请输入身份证号',
trigger: ['blur'],
}, {
validator: (rule, value, callback) => {
return this.$u.test.idCard(value);
},
message: '身份证号不正确',
trigger: ['blur'],
}],
email: [{
required: true,
message: '请输入邮箱',
trigger: ['blur'],
}, {
validator: (rule, value, callback) => {
return this.$u.test.email(value);
},
message: '邮箱不正确',
trigger: ['blur'],
}],
}
}
},
@ -68,11 +134,27 @@
this.getCourseDetail(options.id)
let user = uni.getStorageSync("stbc_lifeData") ? uni.getStorageSync("stbc_lifeData").vuex_user : {}
this.form = user
this.getPosition()
},
methods: {
selectSex(e) {
console.log("e", e)
this.form.sex = this.sexList[e[0]]['value']
},
selectPosition(e){
this.form.company_position = this.positionList[e[0]]['value']
},
//
dateConfirm(e) {
this.form.birthday = e.year + '-' + e.month + '-' + e.day
},
getPosition(){
this.$u.api.getparameter({
number:'company_position'
}).then(res=>{
this.positionList = res.detail
})
},
async getCourseDetail(id) {
const res = await this.$u.api.courseDetail({
@ -95,28 +177,41 @@
this.apply_form = _arr
console.log("this.apply_form", this.apply_form)
// return
this.saveUser()
this.applyCourse()
this.$refs.uForm.validate(valid => {
if (valid) {
this.saveUser()
this.applyCourse()
} else {
console.log('验证失败');
// this.base.toast("")
}
});
},
saveUser() {
this.$u.api.saveUser(this.form).then(res => {
this.base.toast("更新用户信息成功")
this.$u.api.user().then(res => {
// let stor = uni.getStorageSync('stbc_lifeData')
// stor.vuex_user = res.user
// uni.setStorageSync('stbc_lifeData',stor)
this.$u.vuex('vuex_user', res.user)
})
this.$u.api.saveUser(this.form).then(res => {
// this.base.toast("")
this.$u.api.user().then(res => {
// let stor = uni.getStorageSync('stbc_lifeData')
// stor.vuex_user = res.user
// uni.setStorageSync('stbc_lifeData',stor)
this.$u.vuex('vuex_user', res.user)
})
})
},
applyCourse() {
this.$u.api.courseSign({
course_id: this.course_id,
data: this.apply_form
}).then(res => {
this.base.toast("欢迎您报名本课程我们将在1-3个工作日内审核并通知您报名结果…")
this.base.toast("报名成功")
uni.redirectTo({
url: '/packages/mycourse/index'
})
})
},
}
@ -139,8 +234,10 @@
.wrap {
background-color: #fff;
padding: 20rpx 50rpx;
border-radius: 20rpx;
position: relative;
border-radius: 20rpx;
position: relative;
height: 100%;
overflow: scroll;
}
.form-btn {

@ -2,24 +2,31 @@
<view class="container">
<image class="cbg" src="../../static/common_bg.png"></image>
<view class="wrap">
<u-form :model="form" ref="uForm" :label-width="140" :label-align="'left'" :error-type="['toast']">
<u-form :model="form" ref="uForm" :label-width="140" :label-align="'left'" :error-type="['message']">
<u-form-item label="预约日期" prop="date" required>
<u-input :placeholder="'请选择'" v-model="form.date" :type="'select'" @click="dateShow = true" />
</u-form-item>
<u-form-item label="预约时间" prop="timeRange" required>
<u-input :placeholder="'请选择'" v-model="form.timeRange" :type="'select'" @click="openTime" />
</u-form-item>
<u-form-item label="预约事项" prop="content" required>
<u-input :placeholder="'请输入预约事项'" v-model="form.content" type="textarea" />
</u-form-item>
<u-form-item label="预约场地" prop="site" required>
<u-form-item label="预约场地" prop="siteName" required>
<u-input :placeholder="'请选择'" v-model="form.siteName" type="select" @click="siteShow = true" />
</u-form-item>
<u-form-item label="预约事项" prop="content">
<u-input :placeholder="'请输入预约事项'" v-model="form.content" type="textarea" />
</u-form-item>
<u-form-item label="车牌" prop="plate">
<u-input :placeholder="'请输入车牌,多个车牌,分隔'" v-model="form.plate" type="textarea" />
<u-button size="mini" type="primary" @click="openPlate(-1)"></u-button>
<view v-for="(item,index) in plateList">
<view v-if="plateList[index]['show']" style="display: flex;justify-content: space-between;align-items: center;">
<u-input :placeholder="''" v-model="plateList[index]['plate']" :disabled="true" @click="openPlate(index)"/>
<u-button size="mini" type="error" @click="delPlate(index)"></u-button>
</view>
</view>
</u-form-item>
<u-form-item label="同行人" prop="accompany">
<u-button size="mini" type="primary" @click="addAccompany"></u-button>
<u-button size="mini" :disabled="isTotal" :type="isTotal?'':'primary'" @click="addAccompany"></u-button>
<text v-if="siteTotal && siteTotal>0">{{siteTotal}}</text>
<u-table>
<u-tr>
<u-th>姓名</u-th>
@ -28,7 +35,7 @@
<u-tr v-for="(item,index) in form.accompany">
<u-td>{{item.name}}</u-td>
<u-td>
<button @click="delAccompany(index)"></button>
<u-button size="mini" type="error" @click="delAccompany(index)"></u-button>
</u-td>
</u-tr>
</u-table>
@ -46,7 +53,19 @@
<timeSlot ref="timeslot" :title="'选择时间段'" @confirm="confirmTime"></timeSlot>
<u-picker @confirm="siteConfirm" v-model="siteShow" :range="siteList" range-key="name"
mode="selector"></u-picker>
<!-- 新增车牌 -->
<view class="modal">
<u-popup v-model="showPlate" mode="bottom">
<view class="modal-tip">车牌号</view>
<view class="modal-content" style="height:400rpx">
<plate @listenPlateChange="(val)=>{plateChange(val,index)}" :defaultPlate="plateNumber" />
</view>
<view class="form-btn" @click="confirmPlate">
<view type="primary">确认</view>
</view>
</u-popup>
</view>
<!-- 新增修改同行人 -->
<view class="modal">
<u-popup v-model="accompanyShow" mode="bottom">
@ -69,10 +88,14 @@
</template>
<script>
import timeSlot from "@/components/wanghexu-timeslot/wanghexu-timeslot.vue"
import timeSlot from "@/components/wanghexu-timeslot/wanghexu-timeslot.vue"
import {
plate
} from '@/components/plate/index.vue'
export default {
components: {
timeSlot
timeSlot,
plate
},
data() {
return {
@ -84,7 +107,11 @@
hour: false,
minute: false,
second: false
},
},
showPlate:false,
plateIndex:-1,
plateList:[],
plateNumber: ['苏', 'E', '', '', '', '', ''],
form: {
date: '',
timeRange: '',
@ -96,7 +123,9 @@
accompany: []
},
siteShow: false,
siteList: [],
siteList: [],
siteTotal:0,
isTotal:false,
accompanyShow: false,
accompanyObj: {
name: '',
@ -152,13 +181,44 @@
//
getSites() {
this.$u.api.otherConfig().then(res => {
this.siteList = res.appointment
this.siteList = res.appointment.filter(item=>item.status===1)
})
},
siteConfirm(e) {
console.log("e", e)
this.form.site = this.siteList[e[0]].id
this.form.siteName = this.siteList[e[0]].name
this.form.siteName = this.siteList[e[0]].name
this.siteTotal = this.siteList[e[0]].total
},
plateChange(val,index) {
console.log(val,this.plateIndex)
if(val.length>=7){
this.plateList[this.plateIndex]['plate'] = val.join("")
}
console.log(this.plateList[this.plateIndex])
},
openPlate(index){
if(index===-1){
this.showPlate=true
this.plateList.push({
plate:'',
show:false
})
this.plateIndex= this.plateList.length-1
}else{
this.showPlate=true
this.plateNumber = this.plateList[index]['plate']
this.plateIndex = index
}
},
delPlate(index){
this.plateList.splice(index,1)
},
confirmPlate(){
this.showPlate=false
this.plateList[this.plateIndex]['show'] = true
this.plateIndex= -1
},
//
addAccompany() {
@ -168,24 +228,34 @@
this.form.accompany.push(this.accompanyObj)
this.accompanyIndex = -1
this.accompanyObj = {}
this.accompanyShow = false
this.accompanyShow = false
if(this.siteTotal && this.siteTotal>0){
if(this.form.accompany.length===this.siteTotal-1){
this.isTotal = true
}
}
},
delAccompany(index) {
this.form.accompany.splice(index, 1)
},
submit() {
let start_time = ''
let end_time = ''
console.log("form",this.form)
// this.$refs.uForm.validate(valid => {
// if (valid) {
console.log("123",start_time,end_time)
let end_time = ''
this.$refs.uForm.validate(valid => {
if (valid) {
start_time = this.form.date + ' ' + this.form.start_time + ':00'
end_time = this.form.date + ' ' + this.form.end_time + ':00'
// this.form.start_time = start_time
// this.form.end_time = end_time
end_time = this.form.date + ' ' + this.form.end_time + ':00'
this.form.accompany_total = this.form.accompany.length
console.log("this.form", this.form)
console.log("this.form", this.form)
let _plate = ''
if(this.plateList.length>0){
this.plateList.map(item=>{
_plate+=item.plate+','
})
}
this.form.plate = _plate
console.log("plate",this.form)
return
this.$u.api.scheduleSave({
...this.form,
start_time:start_time,
@ -198,11 +268,11 @@
})
})
// } else {
// console.log('');
// this.base.toast("")
// }
// });
} else {
console.log('验证失败');
// this.base.toast("")
}
});
}
}
}
@ -221,25 +291,44 @@
height: 100vh;
}
.wrap{
background: #fff;
position: relative;
padding: 35rpx;
border-radius: 30rpx;
padding-top: 0;
height: 100%;
overflow: scroll;
}
.form-btn {
width: 100%;
// position: fixed;
// left: 0;
// bottom: 0;
padding: 20rpx 0;
&>view{
position: relative;
padding: 60rpx 0;
// z-index:9999;
&>view {
width: 70%;
text-align: center;
margin: 0 auto;
color: #fff;
background-color: #010296;
border-radius: 10rpx;
background: linear-gradient(to right, #5e5fbc, #0d0398);
border-radius: 30rpx;
padding: 20rpx;
}
}
.modal {
::v-deep .u-drawer-bottom {
border-radius: 40rpx;
}
&-tip {
text-align: center;
padding: 30rpx;
font-size: 32rpx;
}
&-content {
// height: 400rpx;
padding: 0 30rpx;
}
}
}
</style>

@ -3,40 +3,62 @@
<image class="cbg" src="../../static/common_bg.png"></image>
<view class="wrap">
<u-form :model="form" :label-width="140" ref="uForm" :label-align="'left'" error-type="toast">
<u-form-item label="姓名" prop="name" required>{{form.username}}</u-form-item>
<u-form-item label="性别" prop="sex" required>{{form.sex}}</u-form-item>
<u-form-item label="身份证号" prop="idcard" required>{{form.idcard}}</u-form-item>
<u-form-item label="手机号码" prop="mobile" required>
{{form.mobile}}
<u-button style="margin-left:20rpx" size="mini" type="primary" @click="changeMobile"></u-button>
<u-form-item label="姓名" prop="username">
{{form.username}}
</u-form-item>
<u-form-item label="公司名称" prop="company_name"><u-input v-model="form.company_name" /></u-form-item>
<u-form-item label="职务" prop="company_position"><u-input
v-model="form.company_position" /></u-form-item>
<u-form-item label="车牌" prop="plate">
<block v-if="plateList.length>0">
<text v-for="item in plateList">{{item}},</text>
</block>
<u-button size="mini" type="primary" v-if="plateList.length<2" @click="addPlate"></u-button>
<u-form-item label="性别" prop="sex">
{{form.sex}}
</u-form-item>
<u-form-item label="身份证号" prop="idcard">
{{form.idcard}}
</u-form-item>
<u-form-item label="出生日期" prop="birthday">
{{form.birthday}}
</u-form-item>
<u-form-item label="联系方式" prop="mobile">
<u-input type="number" border placeholder="请输入联系方式" v-model="form.mobile" />
</u-form-item>
<u-form-item label="邮箱" prop="email">
<u-input v-model="form.email" border placeholder="请输入邮箱" /></u-form-item>
<u-form-item label="公司名称" prop="company_name">
<u-input v-model="form.company_name" border placeholder="请输入公司名称" />
</u-form-item>
<u-form-item label="职务" prop="company_position">
<u-input border @click="showPosition = true" v-model="form.company_position" type="select"
placeholder="请选择职务" />
</u-form-item>
</u-form>
<view class="form-btn">
<view @click="saveUser" type="primary">提交</view>
<u-form-item label="车牌" prop="plate">
<view style="display: flex;align-items: center;justify-content: space-between;">
<view v-if="plateList.length>0">
<view v-for="item in plateList">
{{item}}
</view>
</view>
<u-button size="mini" type="primary" v-if="plateList.length<2" @click="addPlate"></u-button>
</view>
</u-form-item>
</u-form>
<view class="form-btn">
<view @click="saveUser" type="primary">提交</view>
</view>
</view>
<u-picker @confirm="selectPosition" v-model="showPosition" :range="positionList" range-key="value"
mode="selector"></u-picker>
<view class="modal">
<u-popup v-model="showPark" mode="bottom">
<view class="modal-tip">绑定车牌号</view>
<view class="modal-content">
<view class="modal-content" style="height:400rpx">
<view>
车牌<u-input type="text" v-model="plate1" />
<plate @listenPlateChange="plateChange" :defaultPlate="plateNumber" />
</view>
</view>
<view class="modal-btn">
<u-button type="primary" @click="saveUser('add')"></u-button>
<view class="form-btn">
<view @click="saveUser('add')" type="primary">确定</view>
</view>
</u-popup>
</view>
@ -45,25 +67,70 @@
<script>
import tabbar from '@/components/tabbar/tabbar.vue';
import {
plate
} from '@/components/plate/index.vue'
export default {
components: {
plate
},
data() {
return {
showPosition: false,
positionList: [],
form: {},
plateList: [],
showPark: false,
plate1: '',
plateNumber: ['苏', 'E', '', '', '', '', ''],
rules: {
mobile: [{
required: true,
message: '请输入联系方式',
trigger: ['blur'],
}, {
validator: (rule, value, callback) => {
return this.$u.test.mobile(value);
},
message: '手机号码不正确',
trigger: ['blur'],
}],
email: [{
required: true,
message: '请输入邮箱',
trigger: ['blur'],
}, {
validator: (rule, value, callback) => {
return this.$u.test.email(value);
},
message: '邮箱不正确',
trigger: ['blur'],
}],
}
}
},
onReady() {
this.$refs.uForm.setRules(this.rules);
},
onShow() {
this.getUserInfo()
},
onLoad() {
this.getPosition()
},
methods: {
selectPosition(e) {
this.form.company_position = this.positionList[e[0]]['value']
},
getPosition() {
this.$u.api.getparameter({
number: 'company_position'
}).then(res => {
this.positionList = res.detail
})
},
getUserInfo() {
this.$u.api.user().then(res => {
console.log("res", res)
@ -89,6 +156,9 @@
},
changeMobile() {
},
plateChange(val){
this.plate1 = val.join('')
},
saveUser(type) {
@ -97,51 +167,89 @@
this.form.plate = this.plateList.join(",")
}
console.log("plateList", this.plateList)
this.$u.api.saveUser(this.form).then(res => {
this.base.toast("更新用户信息成功")
this.showPark = false
this.plate1 = ''
this.getUserInfo()
})
let that = this
this.$refs.uForm.validate(valid => {
if (valid) {
this.$u.api.saveUser(this.form).then(res => {
this.showPark = false
this.plate1 = ''
this.base.toast("更新用户信息成功", 2000, function() {
if (type === 'add') {
that.getUserInfo()
} else {
uni.switchTab({
url: '/pages/me/index'
})
}
})
})
} else {
console.log('验证失败');
// this.base.toast("")
}
});
},
}
}
</script>
<style scoped lang="scss">
.container{
padding: 30rpx;
width:100%;
height:100vh;
.cbg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100vh;
}
.wrap{
position: relative;
}
.form-btn {
width: 100%;
// position: fixed;
// left: 0;
// bottom: 0;
padding: 20rpx 0;
&>view{
width: 70%;
text-align: center;
margin: 0 auto;
color: #fff;
background-color: #010296;
border-radius: 10rpx;
padding: 20rpx;
}
}
}
<style scoped lang="scss">
.container {
padding: 30rpx;
height: 100vh;
overflow: scroll;
.cbg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100vh;
}
.wrap {
background: #fff;
position: relative;
padding: 35rpx;
border-radius: 30rpx;
padding-top: 0;
}
.form-btn {
width: 100%;
position: relative;
padding: 60rpx 0;
&>view {
width: 70%;
text-align: center;
margin: 0 auto;
color: #fff;
background: linear-gradient(to right, #5e5fbc, #0d0398);
border-radius: 30rpx;
padding: 20rpx;
}
}
.modal {
::v-deep .u-drawer-bottom {
border-radius: 40rpx;
}
&-tip {
text-align: center;
padding: 30rpx;
font-size: 32rpx;
}
&-content {
// height: 400rpx;
padding: 0 30rpx;
}
}
}
</style>

@ -1,71 +1,124 @@
<template>
<template>
<view class="container">
<image class="cbg" src="../../static/common_bg.png"></image>
<view class="wrap">
<view>预约时间{{info.date}} {{formatTime(info.start_time)}}-{{formatTime(info.end_time)}}</view>
<view>预约地点{{info.appointment_config.name}}</view>
<view>预约事项{{info.content}}</view>
<view>预约状态{{info.status_text}}</view>
<view>车牌{{info.plate}}</view>
<view>同行人数{{info.accompany_total}}</view>
<view>同行人员
<block v-if="info.appointment_accompany && info.appointment_accompany.length>0">
<text v-for="appo in info.appointment_accompany">{{appo.name}}</text>
</block>
</view>
<view>状态{{info.status_text}}</view>
<view v-if="info.reason">{{info.reason}}</view>
</view>
</view>
</template>
<script>
export default{
data(){
return{
info:{}
}
},
onLoad(options) {
this.getBookDetail(options.id)
},
methods:{
async getBookDetail(id){
const res = await this.$u.api.scheduleDetail({
id:id
})
this.info = res
},
formatTime(val){
if(val){
return this.$moment(val).format("HH:mm")
}else{
return ''
}
},
}
}
</script>
<style scoped lang="scss">
.container{
padding: 30rpx;
width:100%;
height:100vh;
.cbg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100vh;
}
.wrap{
position: relative;
background-color: #fff;
padding:30rpx;
border-radius: 20rpx;
}
<view class="wrap">
<view class="wrap-item">
<view>
<text>预约日期</text>
<text>{{info.date}}</text>
</view>
<view>
<text>时间段</text>
<text>{{formatTime(info.start_time)}}-{{formatTime(info.end_time)}}</text>
</view>
<view>
<text>预约场地</text>
<text>{{info.appointment_config.name}}</text>
</view>
<view>
<text>预约事项</text>
<text>{{info.content?info.content:''}}</text>
</view>
<view>
<text>车牌</text>
<text>{{info.plate?info.plate:''}}</text>
</view>
<view>
<text>同行人数</text>
<text>{{info.accompany_total>0?info.accompany_total:''}}</text>
</view>
<view v-if="info.accompany_total>0">
<text>同行人员</text>
<text>
<block v-if="info.appointment_accompany && info.appointment_accompany.length>0">
<text v-for="appo in info.appointment_accompany">{{appo.name}}</text>
</block>
</text>
</view>
<view>
<text>状态</text>
<text>{{info.status_text}}</text>
</view>
</view>
<view v-if="info.reason" class="wrap-item">
<view>
<text>审核意见</text>
<text>{{info.reason}}</text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
info: {}
}
},
onLoad(options) {
this.getBookDetail(options.id)
},
methods: {
async getBookDetail(id) {
const res = await this.$u.api.scheduleDetail({
id: id
})
this.info = res
},
formatTime(val) {
if (val) {
return this.$moment(val).format("HH:mm")
} else {
return ''
}
},
}
}
</script>
<style scoped lang="scss">
.container {
padding: 30rpx;
width: 100%;
height: 100vh;
.cbg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100vh;
}
.wrap {
position: relative;
height: 100%;
overflow: scroll;
&-item {
border-radius: 20rpx;
background-color: #fff;
padding: 30rpx;
margin-bottom:30rpx;
&>view{
font-size: 28rpx;
color:#666666;
margin-bottom:30rpx;
display: flex;
&>text:first-child{
color:#333;
width:180rpx;
display: inline-block;
font-weight: bold;
}
&>text:last-child{
width: calc(100% - 180rpx);
}
}
}
}
}
</style>

@ -1,20 +1,52 @@
<template>
<view class="container">
<image class="cbg" src="../../static/common_bg.png"></image>
<view class="list" v-if="hasData">
<scroll-view :scroll-y="true" @scrolltolower="scrollGet" style="height:100%">
<view class="list-item" @click="toDetail(item.id)" v-for="item in book_list">
<view>预约时间{{item.date}} {{formatTime(item.start_time)}}-{{formatTime(item.end_time)}}</view>
<view>预约地点{{item.appointment_config.name}}</view>
<view>预约事项{{item.content}}</view>
<view>预约状态{{item.status_text}}</view>
</view>
</scroll-view>
</view>
<view class="nodata" v-else>
<u-empty mode="data"></u-empty>
</view>
<scroll-view :scroll-y="true" @scrolltolower="scrollGet" class="list">
<image @click="goBook" class="list-img" src="../../static/mybook-top.png"></image>
<view v-if="hasData" style="padding-bottom: 60rpx;">
<view class="list-item" @click="toDetail(item.id)" v-for="item in book_list">
<view class="list-item-top">
<view style="display: flex;justify-content: space-between;align-items: center;">
<image
:src="item.appointment_config.name==='车辆到闸'?'../../static/mybook-icon2.png':'../../static/mybook-icon2.png'">
</image>
{{item.appointment_config.name==='车辆到闸'?'车辆预约':'场地预约'}}
</view>
<view>
<text :class="{'success':item.status===1,'warn':item.status>1}">{{item.status_text}}</text>
</view>
</view>
<view class="list-item-middle">
<view>
<image src="../../static/mybook-icon3.png" style="width:24rpx;height: 24rpx;"></image>
{{item.date}} {{formatTime(item.start_time)}}-{{formatTime(item.end_time)}}
</view>
<view>
<image src="../../static/mybook-icon4.png" style="width:20rpx;height: 26rpx;"></image>
{{item.appointment_config.name}}
</view>
<view>
<image src="../../static/mybook-icon5.png" style="width:21rpx;height: 23rpx;"></image>
{{item.content?item.content:''}}
</view>
</view>
<view class="list-item-bottom">
<text @click.stop="cancelBook(item.id)" v-if="item.status<2"></text>
<text v-if="item.status<2">|</text>
<text>查看</text>
</view>
</view>
</view>
<view class="nodata" v-else>
<u-empty mode="data"></u-empty>
</view>
</scroll-view>
</view>
</template>
@ -47,19 +79,19 @@
},
onReachBottom() {
console.log("this.onReachBottom", this.current_page, this.total_page)
},
methods: {
scrollGet(){
if (!this.hasData) {
return
}
this.current_page = this.current_page + 1
if (this.current_page > this.total_page) {
this.base.toast('没有更多了')
return
}
this.getBookList()
methods: {
scrollGet() {
if (!this.hasData) {
return
}
this.current_page = this.current_page + 1
if (this.current_page > this.total_page) {
this.base.toast('没有更多了')
return
}
this.getBookList()
},
async getBookList() {
const res = await this.$u.api.scheduleIndex({
@ -79,11 +111,19 @@
} else {
return ''
}
},
cancelBook(){
},
toDetail(id) {
uni.navigateTo({
url: '/packages/mybook/detail?id=' + id
})
},
goBook(){
uni.switchTab({
url:'/pages/book/index'
})
}
}
@ -91,42 +131,102 @@
</script>
<style scoped lang="scss">
.container {
width: 100%;
height: 100vh;
overflow: hidden;
.cbg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100vh;
}
.nodata {
position: relative;
top: 0;
left: 0;
height: 100vh;
}
.list {
// height:100vh;
// background: url("../../static/common_bg.png") no-repeat;
// background-size: 100% 100%;
height: 100vh;
// overflow: scroll;
// padding-bottom: 200rpx;
position: relative;
top: 0;
left: 0;
&-item {
margin: 30rpx;
padding: 30rpx;
.container {
width: 100%;
height: 100vh;
overflow: hidden;
.cbg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100vh;
}
.nodata {
position: relative;
top: 0;
left: 0;
height: 100vh;
}
.list {
// height:100vh;
// background: url("../../static/common_bg.png") no-repeat;
// background-size: 100% 100%;
height: 100vh;
padding: 30rpx 0;
// overflow: scroll;
// padding-bottom: 200rpx;
position: relative;
top: 0;
left: 0;
overflow: scroll;
&-img {
width: calc(100% - 60rpx);
height: 125rpx;
display: block;
margin: 0 auto;
}
&-item {
margin: 30rpx;
padding: 30rpx;
background-color: #fff;
}
}
border-radius: 10rpx;
&-top{
font-size: 32rpx;
color:#b08c6c;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom:1rpx solid #ddd;
padding-bottom: 30rpx;
image{
width:37rpx;
height:37rpx;
margin-right:10rpx;
}
text{
font-size: 24rpx;
color:#fff;
padding:5rpx 20rpx;
display: inline-block;
border-radius: 28rpx 0 28rpx 28rpx;
background-color: #bf976e;
}
.success{
background-color: #00b318;
}
.warn{
background-color: #999;
}
}
&-middle{
padding:30rpx 0;
padding-bottom:10rpx;
border-bottom:1rpx solid #ddd;
&>view{
display: flex;
align-items: center;
margin-bottom:20rpx;
image{
margin-right:10rpx;
}
}
}
&-bottom{
text-align: right;
padding-top:30rpx;
color:#b08c6c;
text{
margin-left:20rpx
}
}
}
}
}
</style>

@ -3,11 +3,21 @@
<image class="cbg" src="../../static/common_bg.png"></image>
<view class="wrap">
<view v-if="list.length>0">
<view class="item" v-for="item in list">
<view>上课时间{{item.date}} {{item.period}}</view>
<view>课程主题{{item.theme}}</view>
<view>授课老师{{item.teacher?item.teacher.name:''}}</view>
<view>授课地点{{item.address}}</view>
<view class="item" v-for="item in list">
<view class="item-date">{{item.date}}</view>
<view class="item-period">{{item.period}}</view>
<view class="item-img">
<image src="../../static/mycourse-c1.png" style="width:22rpx;height:22rpx"></image>
<text>{{item.theme}}</text>
</view>
<view class="item-img">
<image src="../../static/mycourse-c2.png" style="width:20rpx;height:23rpx"></image>
<text>{{item.teacher?item.teacher.name:''}}</text>
</view>
<view class="item-img">
<image src="../../static/mycourse-c3.png" style="width:19rpx;height:27rpx"></image>
<text>{{item.address}}</text>
</view>
</view>
</view>
<view class="nodata" v-else>
@ -61,6 +71,26 @@
padding:30rpx;
margin-bottom: 20rpx;
border-radius: 20rpx;
&-date{
font-size: 32rpx;
color:#b08c6c;
margin-bottom:30rpx
}
&-period{
color:#333333;
margin-left:20rpx;
margin-bottom:20rpx
}
&-img{
color:#666666;
display: flex;
align-items: center;
margin-left:20rpx;
margin-bottom:20rpx;
image{
margin-right:10rpx;
}
}
}
.nodata {
height: 100vh;

@ -2,28 +2,43 @@
<view class="container">
<image class="cbg" src="../../static/common_bg.png"></image>
<view class="wrap">
<view v-if="info.status===0">
<view>{{userInfo.username}}:</view>
<view>欢迎您报名{{courseInfo.name}}我们将在1-3个工作日内审核并通知您报名结果.</view>
</view>
<view v-else-if="info.status===1">
<view>{{userInfo.username}}:</view>
<view>您已被{{courseInfo.name}}录取<span
v-if="courseInfo.start_date">请于{{courseInfo.start_date}}到学院报到</span></view>
</view>
<view v-else-if="info.status===2">
<view>{{userInfo.username}}:</view>
<view> 很遗憾您未被{{courseInfo.name}}录取</view>
<topBanner :banner_list="banner_list"></topBanner>
<view class="wrap-status">
<view v-if="info.status===0">
<view class="wrap-status-name">{{userInfo.username}}:</view>
<view class="wrap-status-content">欢迎您报名{{courseInfo.name}}我们将在1-3个工作日内审核并通知您报名结果.</view>
</view>
<view v-else-if="info.status===1">
<view class="wrap-status-name">{{userInfo.username}}:</view>
<view class="wrap-status-content">您已被{{courseInfo.name}}录取<span
v-if="courseInfo.start_date">请于{{courseInfo.start_date}}到学院报到</span></view>
</view>
<view v-else-if="info.status===2">
<view class="wrap-status-name">{{userInfo.username}}:</view>
<view class="wrap-status-content"> 很遗憾您未被{{courseInfo.name}}录取</view>
</view>
<view v-else-if="info.status===3">
<view class="wrap-status-name">{{userInfo.username}}:</view>
<view class="wrap-status-content"> 您未被{{courseInfo.name}}纳入备选人才</view>
</view>
</view>
<view class="wrap-img">
<image src="../../static/mycourse-status.png"></image>
</view>
</view>
</view>
</template>
<script>
import topBanner from '@/components/topBanner.vue'
export default {
components: {},
components: {
topBanner
},
data() {
return {
banner_list: [],
info: {},
userInfo: {},
courseInfo: {}
@ -31,6 +46,7 @@
},
onLoad(options) {
this.getCourseDetail(options.id)
this.getBannerList()
},
methods: {
async getCourseDetail(id) {
@ -41,7 +57,12 @@
this.info = res.detail
this.userInfo = res.detail.user
this.courseInfo = res.detail.course
console.log("123", this.info, this.userInfo)
},
async getBannerList(){
const res = await this.$u.api.otherBanner({
position:1,
})
this.banner_list = res
},
}
@ -63,7 +84,28 @@
}
.wrap {
position: relative;
position: relative;
height:100%;
&-status{
margin:120rpx 20rpx;
&-name{
color:#000;
font-size: 32rpx;
padding-bottom:20rpx;
}
&-content{
line-height: 2;
text-indent: 2em;
}
}
&-img{
image{
width:260rpx;
height:314rpx;
display: block;
margin:0 auto;
}
}
}
}

@ -2,38 +2,39 @@
<view class="container">
<image class="cbg" src="../../static/common_bg.png"></image>
<view class="wrap">
<view v-if="list.length>0">
<view style="border:1px solid red" @click="toUrl(item.id)" v-for="item in list">
</view>
</view>
<view class="nodata" v-else>
<u-empty mode="data"></u-empty>
</view>
<view v-if="list.length>0">
<view class="wrap-item" @click="toUrl(item.id)" v-for="item in list">
<view class="wrap-item-name">{{item.username}}</view>
<view>{{item.company_name}}</view>
<view>{{item.company_position}}</view>
</view>
</view>
<view class="nodata" v-else>
<u-empty mode="data"></u-empty>
</view>
</view>
</view>
</template>
<script>
export default {
components: {
},
components: {},
data() {
return {
list:[]
list: []
}
},
onLoad(options) {
this.getMyCourseTxl(options.id)
},
methods:{
async getMyCourseTxl(id){
const res = await this.$u.api.courseUserList({
course_id:id,
type:2
})
this.list = res.list
},
},
methods: {
async getMyCourseTxl(id) {
const res = await this.$u.api.courseUserList({
course_id: id,
type: 2
})
this.list = res.list
},
}
}
@ -54,9 +55,24 @@
}
.wrap {
position: relative;
.nodata{
height:100vh;
position: relative;
.nodata {
height: 100vh;
}
&-item {
margin: 30rpx 0;
padding: 30rpx;
background-color: #fff;
border-radius: 20rpx;
&>view{
margin-bottom:10rpx;
}
&-name{
font-size: 32rpx;
color:#333;
}
}
}
}

@ -2,10 +2,16 @@
<view class="container">
<image class="cbg" src="../../static/common_bg.png"></image>
<view class="wrap">
<view @click="toUrl(1)"></view>
<view @click="toUrl(2)"></view>
<view @click="toUrl(3)"></view>
<view @click="toUrl(4)"></view>
<view class="wrap-title">
{{info.course?info.course.name:''}}
</view>
<view class="wrap-btn">
<image @click="toUrl(1)" src="../../static/mycourse-icon1.png"></image>
<image @click="toUrl(2)" src="../../static/mycourse-icon2.png"></image>
<image @click="toUrl(3)" src="../../static/mycourse-icon3.png"></image>
<image @click="toUrl(4)" src="../../static/mycourse-icon4.png"></image>
</view>
</view>
</view>
</template>
@ -16,11 +22,13 @@
},
data() {
return {
course_id:''
course_id:'',
info:''
}
},
onLoad(options) {
this.course_id = options.id
this.course_id = options.id
this.getCourseDetail(options.id)
},
methods:{
toUrl(type){
@ -29,19 +37,42 @@
url:'/packages/mycourse/courseStatus?id='+this.course_id
})
}else if(type===2){
if(this.info.status===0){
this.base.toast("请等待审核通过")
return
}
if(this.info.status>1){
this.base.toast("您没有权限查看本班通讯录")
return
}
uni.navigateTo({
url:'/packages/mycourse/courseTxl?id='+this.course_id
})
}else if(type===3){
if(this.info.course.is_arrange!=1){
this.base.toast("当前课程没有课表")
return
}
uni.navigateTo({
url:'/packages/mycourse/courseContents?id='+this.course_id
})
}else if(type===4){
if(this.info.course.is_fee!=1){
this.base.toast("当前课程无需缴费")
return
}
uni.navigateTo({
url:'/packages/mycourse/coursePay?id='+this.course_id
})
}
},
async getCourseDetail(id) {
const res = await this.$u.api.courseGetSign({
course_id: id
})
this.info = res.detail
},
}
}
@ -61,21 +92,24 @@
}
.wrap{
position: relative;
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
&>view{
width:200rpx;
height:180rpx;
height:100%;
&-title{
color:32rpx;
font-size: 32rpx;
text-align: center;
line-height: 180rpx;
margin:20rpx;
font-size: 28rpx;
background:linear-gradient(to right,#d8b594,#ba9676);
border-radius: 20rpx;
color:#fff;
padding:120rpx 0;
}
&-btn{
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
padding:0 35rpx;
image{
width:280rpx;
height:195rpx;
margin-bottom:35rpx;
}
}
}
}

@ -2,54 +2,91 @@
<view class="container">
<image class="cbg" src="../../static/common_bg.png"></image>
<view class="wrap">
<view class="item" @click="toUrl(item.id)" v-for="item in list">
<view>{{item.name}}</view>
<!-- <view>{{item.sign_date_status}}</view> -->
<!-- <block v-for="item1 in apply_status_list">
<view v-if="item.status===item1.id">{{item1.value}}</view>
</block> -->
<u-button type="primary" size="mini" @click="toUrl(item.id)"></u-button>
<topBanner :banner_list="banner_list"></topBanner>
<view class="list">
<view>
<view class="list-title">进行中</view>
<view v-if="list.length>0">
<view class="list-item" @click="toUrl(item.id)" v-for="item in list">
<view class="list-item-name">{{item.name}}</view>
<view class="list-item-buttom">
<view>
<image src="../../static/mycourse-share.png"></image>
<text>分享</text>
</view>
<view class="list-item-btn" @click="toUrl(item.id)">
进入
</view>
</view>
<!-- <u-button type="primary" size="mini" @click="toUrl(item.id)"></u-button> -->
</view>
</view>
</view>
<view>
<view class="list-title">历史课程</view>
<view v-if="historyList.length>0">
<view class="list-item" @click="toUrl(item.id)" v-for="item in historyList">
<view class="list-item-name list-item-hisname">{{item.name}}</view>
<view class="list-item-buttom">
<view>
<image src="../../static/mycourse-share.png"></image>
<text>分享</text>
</view>
<view class="list-item-btn" @click="toUrl(item.id)">
进入
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
<script>
import topBanner from '@/components/topBanner.vue'
export default {
components: {
components: {
topBanner
},
data() {
return {
apply_status_list: [{
id: 0,
value: '待审核',
type: ''
}, {
id: 1,
value: '通过',
type: 'success'
}, {
id: 2,
value: '审核不通过',
type: 'warning'
}],
list:[]
banner_list:[],
list:[],
historyList:[]
}
},
onLoad() {
console.log("selectOptions",this.selectOptions)
this.getMyCourse()
this.getMyCourse()
this.getBannerList()
},
methods:{
async getMyCourse(){
const res = await this.$u.api.courseMy()
this.list = res.list.data
res.list.data.map(item=>{
if(item.date_status==='课程已结束'){
this.historyList.push(item)
}else{
this.list.push(item)
}
})
},
toUrl(id){
uni.navigateTo({
url:'/packages/mycourse/detail?id='+id
})
},
async getBannerList(){
const res = await this.$u.api.otherBanner({
position:1
})
this.banner_list = res
},
}
}
@ -69,12 +106,57 @@
}
.wrap{
position: relative;
.item{
background-color: #fff;
padding:30rpx;
margin-bottom: 20rpx;
border-radius: 20rpx;
height:100%;
overflow-x: hidden;
overflow-y: scroll;
.list{
margin-top:50rpx;
&-title{
margin-bottom:30rpx;
color:#333;
font-size: 42rpx;
}
&-item{
background-color: #fff;
padding:30rpx;
margin-bottom: 30rpx;
border-radius: 20rpx;
border-bottom: 2px solid #b79373;
&-name{
height:80rpx;
border-bottom: 1px solid #f5f5f5;
padding-bottom:20rpx;
}
&-hisname{
color:#888888
}
&-buttom{
display: flex;
justify-content: space-between;
align-items: center;
color:#b79373;
margin-top:20rpx;
&>view:first-child{
display: flex;
align-items: center;
image{
width:26rpx;
height:26rpx;
margin:0 10rpx;
}
}
}
&-btn{
background: linear-gradient(to right,#5e5fbc,#0d0398);
border-radius: 30rpx;
color:#fff;
text-align: center;
padding:10rpx 20rpx;
width:140rpx;
}
}
}
}
}

@ -1,74 +1,224 @@
<template>
<view class="container">
<u-form :model="form" :label-width="140" ref="uForm" :label-align="'left'" error-type="toast">
<u-form-item label="姓名" prop="username" required><u-input v-model="form.username" /></u-form-item>
<u-form-item label="性别" prop="sex" required><u-input @click="showSex = true" v-model="form.sex"
type="select" /></u-form-item>
<u-form-item label="身份证号" prop="idcard" required><u-input type="idcard"
v-model="form.idcard" /></u-form-item>
<u-form-item label="手机号码" prop="mobile" required><u-input type="number"
v-model="form.mobile" /></u-form-item>
<u-form-item label="公司名称" prop="company_name"><u-input v-model="form.company_name" /></u-form-item>
<u-form-item label="职务" prop="company_position"><u-input v-model="form.company_position" /></u-form-item>
</u-form>
<u-button @click="saveUser"></u-button>
<image class="cbg" src="../../static/common_bg.png"></image>
<view class="wrap">
<u-form :model="form" :label-width="140" ref="uForm" :label-align="'left'" :error-type="['message']">
<u-form-item label="姓名" prop="username" required>
<u-input v-model="form.username" placeholder="请输入姓名" />
</u-form-item>
<u-form-item label="性别" prop="sex" required>
<u-input @click="showSex = true" placeholder="请选择性别" v-model="form.sex" type="select" />
</u-form-item>
<u-form-item label="身份证号" prop="idcard" required>
<u-input type="idcard" placeholder="请输入身份证号"
v-model="form.idcard" /></u-form-item>
<u-form-item label="联系方式" prop="mobile" required>
<u-input type="number" placeholder="请输入联系方式"
v-model="form.mobile" />
</u-form-item>
<u-form-item label="出生日期" prop="birthday" required>
<u-input @click="dateShow=true" placeholder="请选择出生日期" v-model="form.birthday" type="select" /></u-form-item>
<u-form-item label="邮箱" prop="email" required>
<u-input v-model="form.email" placeholder="请输入邮箱"/></u-form-item>
<u-form-item label="公司名称" prop="company_name">
<u-input v-model="form.company_name" placeholder="请输入公司名称"/>
</u-form-item>
<u-form-item label="职务" prop="company_position">
<u-input @click="showPosition = true" v-model="form.company_position" type="select" placeholder="请选择职务"/></u-form-item>
</u-form>
</view>
<view class="form-btn">
<view @click="saveUser"></view>
</view>
<u-picker @confirm="selectSex" v-model="showSex" :range="sexList" range-key="value" mode="selector"></u-picker>
<u-picker @confirm="dateConfirm" mode="time" v-model="dateShow" :params="dateParams"></u-picker>
<u-picker @confirm="selectPosition" v-model="showPosition" :range="positionList" range-key="value" mode="selector"></u-picker>
</view>
</template>
<script>
export default {
data() {
return {
showSex: false,
form: {},
return {
course_id:null,
showSex: false,
showPosition:false,
positionList:[],
dateShow:false,
dateParams: {
year: true,
month: true,
day: true,
hour: false,
minute: false,
second: false
},
form: {
username: '',
sex: ''
},
sexList: [{
label: '男',
value: '男'
}, {
label: '女',
value: '女'
}],
rules: {
username: [{
}],
rules: {
username: [{
required: true,
message: '请输入姓名',
trigger: ['blur'],
}],
sex: [{
required: true,
message: '请选择性别',
trigger: ['change','blur'],
}],
birthday: [{
required: true,
message: '请输入姓名',
trigger: ['change', 'blur'],
message: '请选择出生日期',
trigger: ['change','blur'],
}],
mobile: [{
required: true,
message: '请输入联系方式',
trigger: ['blur'],
}, {
validator: (rule, value, callback) => {
return this.$u.test.mobile(value);
},
message: '手机号码不正确',
trigger: ['blur'],
}],
sex: [{
idcard: [{
required: true,
message: '请选择性别',
trigger: ['change', 'blur'],
message: '请输入身份证号',
trigger: ['blur'],
}, {
validator: (rule, value, callback) => {
return this.$u.test.idCard(value);
},
message: '身份证号不正确',
trigger: ['blur'],
}],
email: [{
required: true,
message: '请输入邮箱',
trigger: ['blur'],
}, {
validator: (rule, value, callback) => {
return this.$u.test.email(value);
},
message: '邮箱不正确',
trigger: ['blur'],
}],
}
}
},
onReady() {
this.$refs.uForm.setRules(this.rules);
},
onLoad() {
},
methods:{
selectSex(e){
console.log("e",e)
this.form.sex = this.sexList[e[0]]['value']
},
onReady() {
this.$refs.uForm.setRules(this.rules);
},
onLoad(options) {
this.course_id = options.id?options.id:null
this.getPosition()
},
methods: {
selectSex(e) {
this.form.sex = this.sexList[e[0]]['value']
},
saveUser(){
this.$u.api.saveUser(this.form).then(res=>{
this.base.toast("注册成功")
this.$u.api.user().then(res => {
this.$u.vuex('vuex_user', res.user)
uni.redirectTo({
url:'/pages/me/index'
})
})
selectPosition(e){
this.form.company_position = this.positionList[e[0]]['value']
},
//
dateConfirm(e) {
this.form.birthday = e.year + '-' + e.month + '-' + e.day
},
getPosition(){
this.$u.api.getparameter({
number:'company_position'
}).then(res=>{
this.positionList = res.detail
})
},
saveUser() {
let that = this
this.$refs.uForm.validate(valid => {
if (valid) {
this.$u.api.saveUser(this.form).then(res => {
this.$u.api.user().then(res => {
this.$u.vuex('vuex_user', res.user)
this.base.toast("注册成功",2000,function(){
if(that.course_id){
// uni.redirectTo({
// url:'/packages/apply/index?id='+that.course_id
// })
uni.redirectTo({
url:'/pages/course/index'
})
}else{
uni.switchTab({
url: '/pages/me/index'
})
}
})
})
})
} else {
console.log('验证失败');
// this.base.toast("")
}
});
},
}
}
</script>
<style>
<style scoped lang="scss">
.container {
padding: 30rpx;
height: 100vh;
overflow: scroll;
.cbg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100vh;
}
.wrap {
background: #fff;
position: relative;
padding: 35rpx;
border-radius: 30rpx;
padding-top: 0;
}
.form-btn {
width: 100%;
position: relative;
padding: 60rpx 0;
&>view {
width: 70%;
text-align: center;
margin: 0 auto;
color: #fff;
background: linear-gradient(to right, #5e5fbc, #0d0398);
border-radius: 30rpx;
padding: 20rpx;
}
}
}
</style>

@ -0,0 +1,212 @@
<template>
<view class="container">
<image class="cbg" src="../../static/login-top.png"></image>
<view class="login">
<image class="login-logo" src="../../static/login-logo.png"></image>
<view class="login-form">
<view>
<u-input :custom-style="inputStyle" :clearable="false" v-model="form.mobile"
placeholder="手机号"></u-input>
</view>
<view class="sendmsg">
<u-input v-model="form.code" :custom-style="inputSendStyle" :clearable="false"
placeholder="验证码"></u-input>
<view @click="getSmsCode" class="send" :class="{'hasSend':hasSend}">{{hasSend?'已发送':'获取验证码'}}<text
v-if="hasSend">({{count}}s)</text></view>
</view>
</view>
<view class="login-btn">
<view @click="handleMsgLogin"></view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
hasSend: false,
count: 60,
inputStyle: {
'padding': '0rpx 30rpx',
'height': '80rpx',
'border': '1rpx solid #dad8d8;',
'border-radius': '20rpx'
},
inputSendStyle: {
'padding': '0rpx 30rpx',
'height': '80rpx',
'border': '1rpx solid #dad8d8;',
'border-radius': '20rpx 0 0 20rpx'
},
form: {
mobile: '',
code: '',
},
sendTimer: null,
type:'me'
}
},
onLoad(options) {
this.type=options.id?'course':'me'
},
methods: {
getSmsCode() {
if (this.hasSend) {
return
}
if (this.base.isNull(this.form.mobile)) {
this.base.toast('手机号码不能为空')
return
}
if (!this.base.isMobile(this.form.mobile)) {
this.base.toast('手机号码错误')
return
}
let that = this
this.$u.api.sendSms({
mobile: this.form.mobile
}).then(res => {
this.base.toast("发送成功")
this.hasSend = true
this.sendTimer = setInterval(function() {
if (that.count > 1) {
that.count--
} else {
clearInterval(that.sendTimer);
that.hasSend = false;
}
}, 1000)
})
},
handleMsgLogin() {
if (this.base.isNull(this.form.mobile)) {
this.base.toast('请输入手机号')
return
}
if (this.base.isNull(this.form.code)) {
this.base.toast('请输入验证码')
return
}
let that = this
console.log("this.type",this.type)
this.$u.api.bindMobile({
mobile: this.form.mobile,
code: this.form.code,
is_bind: 1
}).then(res => {
this.base.toast('绑定成功')
if (that.sendTimer) {
clearInterval(that.sendTimer);
that.hasSend = false;
}
this.$u.api.user().then(res => {
this.$u.vuex('vuex_user', res.user)
if(that.type=='course'){
uni.switchTab({
url: '/pages/course/index'
})
}else{
uni.switchTab({
url: '/pages/me/index'
})
}
})
})
},
}
}
</script>
<style scoped lang="scss">
.container {
width: 100%;
height: 100vh;
overflow: scroll;
background: #fefcf7;
position: relative;
.cbg {
position: absolute;
top: 0;
left: 0;
width: 509rpx;
height: 369rpx;
}
.login {
width: 590rpx;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
&-logo {
width: 345rpx;
height: 72rpx;
margin: 0 auto;
display: block;
}
&-form {
margin: 100rpx 0;
&>view {
border-radius: 20rpx;
&:first-child {
margin-bottom: 50rpx;
}
}
.sendmsg {
display: flex;
justify-content: space-between;
align-items: center;
u-input {
width: calc(100% - 200rpx);
}
.send {
background: #c69c6d;
color: #fff;
height: 80rpx;
line-height: 80rpx;
border-radius: 0 20rpx 20rpx 0;
width: 200rpx;
text-align: center;
border: 1px solid #c69c6d;
box-sizing: content-box;
}
.hasSend {
background: #dad8d8;
color: #333;
border: 1px solid #dad8d8;
}
}
}
&-btn {
width: 100%;
position: relative;
&>view {
width: 70%;
text-align: center;
margin: 0 auto;
color: #fff;
background: linear-gradient(to right, #e4cdb4, #c69c6d);
border-radius: 30rpx;
padding: 20rpx;
}
}
}
}
</style>

@ -4,7 +4,7 @@
<view class="wrap">
<view v-if="list.length>0">
<view class="wrap-item" @click="toUrl(item.id)" v-for="item in list">
<view>{{item.username}}</view>
<view class="wrap-item-name">{{item.username}}</view>
<view>{{item.company_name}}</view>
<view>{{item.company_position}}</view>
</view>
@ -24,11 +24,11 @@
list: []
}
},
onLoad(options) {
this.getMyCourseTxl(options.id)
onLoad() {
this.getMyCourseTxl()
},
methods: {
async getMyCourseTxl(id) {
async getMyCourseTxl() {
const res = await this.$u.api.courseUserList({
// course_id: id,
type: 1
@ -61,9 +61,18 @@
height: 100vh;
}
&-item {
margin: 30rpx;
margin: 30rpx 0;
padding: 30rpx;
background-color: #fff;
border-radius: 20rpx;
&>view{
margin-bottom:10rpx;
}
&-name{
font-size: 32rpx;
color:#333;
}
}
}
}

@ -51,6 +51,12 @@
"navigationBarTitleText": "注册"
// "navigationStyle": "custom"
}
},{
"path": "register/login",
"style": {
"navigationBarTitleText": "登录",
"navigationStyle": "custom"
}
},{
"path": "apply/index",
"style": {

@ -1,13 +1,39 @@
<template>
<view class="container">
<image class="cbg" src="../../static/common_bg.png"></image>
<view class="wrap">
<view class="wrap-block">
<view @click="toUrl(1)"></view>
<view @click="toUrl(2)"></view>
</view>
<image class="cbg" src="../../static/common_bg.png"></image>
<view class="book-top">
<image src="../../static/book-top.png"></image>
</view>
<view class="book">
<view class="book-pic">
<view class="book-pic-item">
<image src="../../static/book-pic1.png"></image>
<view>
<view>图书馆</view>
<view>
<text class="colortext">1</text>
<text>/1</text>
</view>
</view>
</view>
<view class="book-pic-item">
<image src="../../static/book-pic1.png"></image>
<view>
<view>会议室</view>
<view>
<text class="colortext">1</text>
<text>/1</text>
</view>
</view>
</view>
</view>
<view class="book-block">
<image @click="toUrl(1)" src="../../static/book-icon1.png"></image>
<image @click="toUrl(2)" src="../../static/book-icon2.png"></image>
<!-- <view @click="toUrl(1)"></view>
<view @click="toUrl(2)"></view> -->
</view>
</view>
<tabbar :currentPage="2"></tabbar>
</view>
@ -39,14 +65,17 @@
})
},
toUrl(type) {
if (type === 1) {
if (this.appointment_total > 0) {
uni.navigateTo({
url: '/packages/booksubmit/index'
})
} else {
this.base.toast("您当前没有预约次数")
}
if (type === 1) {
uni.navigateTo({
url: '/packages/booksubmit/index'
})
// if (this.appointment_total > 0) {
// uni.navigateTo({
// url: '/packages/booksubmit/index'
// })
// } else {
// this.base.toast("")
// }
} else if (type === 2) {
if (this.is_schoolmate) {
@ -68,36 +97,68 @@
.container {
width: 100%;
height: 100vh;
padding-bottom: 200rpx;
.cbg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100vh;
}
.wrap{
padding-bottom: 200rpx;
.cbg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100vh;
}
.book-top{
position: relative;
top:0;
left:0;
&-block{
display: flex;
align-items: center;
justify-content: center;
&>view{
width:200rpx;
height:180rpx;
text-align: center;
line-height: 180rpx;
margin:20rpx;
font-size: 28rpx;
background:linear-gradient(to right,#d8b594,#ba9676);
border-radius: 20rpx;
color:#fff;
}
padding:80rpx 0 60rpx 0;
image{
width:539rpx;
height:88rpx;
display: block;
margin:0 auto;
}
}
.book {
position: relative;
padding:0 30rpx;
height:calc(100vh - 400rpx);
overflow: scroll;
&-block {
display: flex;
align-items: center;
justify-content: space-between;
image{
width:330rpx;
height:126rpx;
}
}
}
&-pic{
&-item{
font-size: 0;
border-radius: 10rpx;
margin-bottom:30rpx;
image{
width:100%;
height:350rpx;
}
&>view{
display: flex;
align-items: center;
justify-content: space-between;
padding:20rpx 30rpx;
background-color: #fff;
font-size: 28rpx;
color:#000;
border-radius: 0 0 10rpx 10rpx;
text{
color:#666;
font-size: 24rpx;
}
.colortext{
color:#b79373;
}
}
}
}
}
}
</style>

@ -1,52 +1,82 @@
<template>
<view class="container">
<image class="cbg" src="../../static/common_bg.png"></image>
<view class="list" v-if="hasData">
<scroll-view :scroll-y="true" @scrolltolower="scrollGet" style="height:100%">
<view class="list-item" v-for="item in course_list" @click="toDetail(item.id)">
<view class="list-item-wrap">
<!-- <view> -->
<scroll-view :scroll-y="true" @scrolltolower="scrollGet" class="list">
<topBanner :banner_list="banner_list"></topBanner>
<view v-if="hasData" style="padding-bottom: 200rpx;">
<view class="list-item" :class="{'list-end':item.sign_date_status==='已结束','list-start':item.sign_date_status==='未开始'||item.sign_date_status==='待定'}"
v-for="item in course_list">
<view class="list-item-wrap">
<view class="list-item-wrap-time">
<view>八月</view>
<view class="bigFont">06</view>
<view>2024 </view>
<!-- 开课日期{{item.start_date}}{{item.end_date}} -->
</view>
<view class="list-item-wrap-status">
<block v-for="cs in course_status">
<u-tag v-if="item.date_status===cs.value" :type="cs.type" :closeable="false"
:text="item.date_status" mode="dark" />
</block>
<view>{{item.name}}</view>
<view>
<text></text>报名{{item.sign_date_status}}
</view>
</view>
<view v-if="!item.sign_start_date || item.sign_date_status==='待定'">
<view class="bigFont" style="border-bottom: none;">{{convertToChineseMonth(item.sign_start_date,item.sign_date_status).month}}</view>
<view class="bigFont" style="border-bottom: none;">{{convertToChineseMonth(item.sign_start_date,item.sign_date_status).year}}</view>
</view>
<view v-else>
<view>{{convertToChineseMonth(item.sign_start_date).month}}</view>
<view class="bigFont">{{convertToChineseMonth(item.sign_start_date).day}}</view>
<view>{{convertToChineseMonth(item.sign_start_date).year}}</view>
</view>
</view>
<view class="list-item-wrap-status">
<view class="list-item-wrap-status-type">
<text>{{item.type_detail.name}}</text>
</view>
<view class="list-item-wrap-status-title">{{item.name}}</view>
<view class="list-item-wrap-status-label">
<text></text>报名{{item.sign_date_status}}
</view>
</view>
</view>
<view class="list-item-btn">
<view @click="toDetail(item.id)"></view>
</view>
</view>
<!-- <u-loadmore v-if="load_status" :status="load_status" /> -->
</view>
<view class="nodata" v-else>
<u-empty mode="data"></u-empty>
</view>
</scroll-view>
<tabbar :currentPage="1"></tabbar>
<view class="modal">
<u-popup v-model="showRegister" mode="bottom">
<view>
<view class="modal-tip">提示</view>
<view class="modal-content">
<view>如您已是我方校友请先绑定账号</view>
<view>如您还不是我方校友请先注册</view>
</view>
<view class="list-item-btn">
<view @click="toDetail(item.id)"></view>
<view class="modal-btn">
<u-button type="primary" @click="goBind"></u-button>
<u-button type="primary" @click="toRegister"></u-button>
</view>
</view>
</scroll-view>
<!-- <u-loadmore v-if="load_status" :status="load_status" /> -->
</u-popup>
</view>
<view class="nodata" v-else>
<u-empty mode="data"></u-empty>
</view>
<tabbar :currentPage="1"></tabbar>
</view>
</template>
<script>
import tabbar from '@/components/tabbar/tabbar.vue';
import topBanner from '@/components/topBanner.vue'
export default {
components: {
tabbar
tabbar,
topBanner
},
data() {
return {
hasMobile: false,
return {
showRegister:false,
banner_list: [],
hasMobile: false,
go_course_id:'',
hasData: true,
current_page: 1,
total_page: 0,
@ -61,27 +91,39 @@
}, {
type: 'info',
value: '已结束'
}]
}],
}
},
onLoad() {
this.getCourseList()
this.getBannerList()
},
onShow() {
this.showRegister = false
let user = uni.getStorageSync("stbc_lifeData") ? uni.getStorageSync("stbc_lifeData").vuex_user : {}
if(!this.base.isNull(user.mobile)){
this.hasMobile = true
}else{
this.hasMobile = false
}
},
onReachBottom() {
// console.log("this.onReachBottom", this.current_page, this.total_page)
},
methods: {
scrollGet(){
console.log("123")
this.current_page = this.current_page + 1
if (this.current_page > this.total_page) {
this.base.toast('没有更多了')
return
}
this.getCourseList()
methods: {
scrollGet() {
if (!this.hasData) {
return
}
this.current_page = this.current_page + 1
if (this.current_page > this.total_page) {
this.base.toast('没有更多了')
return
}
this.getCourseList()
},
async getCourseList() {
this.load_status = 'loading'
@ -96,11 +138,64 @@
this.course_list.push(...res.data)
},
toDetail(id) {
uni.navigateTo({
url: '/packages/course/detail?id=' + id
convertToChineseMonth(dateString,dateStatus) {
if (this.base.isNull(dateString) || dateStatus==='待定') {
return {
month:'待',
year:"定"
}
}else{
//
const dateParts = dateString.split('-');
const year = parseInt(dateParts[0], 10);
const monthNumber = parseInt(dateParts[1], 10);
const day = parseInt(dateParts[2], 10);
//
const chineseMonths = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'];
//
const chineseMonth = chineseMonths[monthNumber - 1];
return {
year: year,
month: chineseMonth,
day: day
}
}
},
//
toDetail(id) {
this.go_course_id = id
if(!this.hasMobile){
this.showRegister = true
return
}else{
uni.navigateTo({
url:'/packages/apply/index?id='+this.go_course_id
})
}
},
//
goBind(){
console.log("qwe")
uni.navigateTo({
url:'/packages/register/login?id='+this.go_course_id
})
},
//
toRegister(){
uni.navigateTo({
url:'/packages/register/index?id='+this.go_course_id
})
},
async getBannerList() {
const res = await this.$u.api.otherBanner({
position:1,
})
}
this.banner_list = res
},
}
}
@ -120,67 +215,201 @@
height: 100vh;
}
.nodata {
position: relative;
top: 0;
left: 0;
height: 100vh;
}
.list {
// height:100vh;
// background: url("../../static/common_bg.png") no-repeat;
// background-size: 100% 100%;
height: 100vh;
// overflow: scroll;
padding-bottom: 200rpx;
position: relative;
top: 0;
left: 0;
overflow: scroll;
.nodata {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
&-item {
margin: 30rpx;
background-color: #fff;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 -1rpx 20rpx #bed2ec;
border-radius: 10rpx;
&-wrap{
width:calc(100% - 150rpx);
display: flex;
background-color: #fff;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 -1rpx 20rpx #bed2ec;
border-radius: 10rpx;
&-wrap {
width: calc(100% - 150rpx);
display: flex;
&-time {
padding: 30rpx;
background: linear-gradient(to bottom, #5e5fbc, #0d0398);
border-radius: 10rpx 0 0 10rpx;
color: #fff;
width: 120rpx;
text-align: center;
font-size: 24rpx;
position: relative;
&>view {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.bigFont {
font-size: 50rpx;
border-bottom: 1rpx solid #ddd;
}
}
&-status {
margin: 20rpx;
border-right: 1px solid #ddd;
width: calc(100% - 120rpx);
margin-right: 0;
padding-right: 20rpx;
position: relative;
&-type {
text-align: right;
margin-bottom: 20rpx;
&>text {
border-radius: 28rpx 0 28rpx 28rpx;
color: #fff;
padding: 5rpx 15rpx;
background: linear-gradient(to right, #5e5fbc, #0d0398, );
}
}
&-title {
height: 80rpx;
overflow: hidden;
margin-bottom: 20rpx;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/* 定义文本的行数 */
overflow: hidden;
text-overflow: ellipsis;
}
&-label {
padding: 5rpx 20rpx;
border: 1px solid #cfcfcf;
border-radius: 30rpx;
display: inline-block;
position: relative;
&:before {
content: " ";
background: #00b318;
display: inline-block;
width: 10rpx;
height: 10rpx;
top: -5rpx;
position: relative;
// top: -2rpx;
margin-right: 14rpx;
border-radius: 50%;
}
}
}
}
&-btn {
width: 150rpx;
font-size: 24rpx;
background: linear-gradient(to right, #5e5fbc, #0d0398);
color: #fff;
padding: 10rpx 20rpx;
border-radius: 30rpx;
margin: 20rpx;
}
}
//
&-start{
.list-item-wrap{
width:100%;
&-time{
padding: 30rpx;
background:linear-gradient(to right,#5e5fbc,#0d0398);
border-radius: 10rpx 0 0 10rpx;
color:#fff;
width:120rpx;
text-align: center;
font-size: 24rpx;
.bigFont{
font-size: 50rpx;
border-bottom:1rpx solid #ddd;
background: linear-gradient(to bottom,#cf847d,#b00d10);
}
&-status{
border-right:none;
&-type {
&>text {
background: linear-gradient(to right,#cf847d,#b00d10);
}
}
&-label {
&:before {
content: " ";
background: #cfcfcf;
}
}
}
}
.list-item-btn{
display: none;
}
}
//
&-end{
.list-item-wrap{
width:100%;
&-time{
background: linear-gradient(to bottom,#e4cdb4,#c69c6d);
}
&-status{
margin:20rpx;
border-right:1px solid #ddd;
width:calc(100% - 120rpx);
margin-right: 0;
padding-right: 20rpx;
border-right:none;
&-type {
&>text {
background: linear-gradient(to right,#e4cdb4,#c69c6d);
}
}
&-label {
&:before {
content: " ";
background: #cfcfcf;
}
}
}
}
&-btn{
width:150rpx;
font-size: 24rpx;
background:linear-gradient(to right,#5e5fbc,#0d0398);
color:#fff;
padding:10rpx 20rpx;
border-radius: 30rpx;
margin:30rpx;
}
}
.list-item-btn{
display: none;
}
}
}
.modal{
::v-deep .u-drawer-bottom{
border-radius: 40rpx;
}
&-tip{
text-align: center;
padding:30rpx;
font-size: 32rpx;
}
&-content{
height:300rpx;
padding:0 30rpx;
}
&-btn{
display: flex;
justify-content: space-between;
padding:30rpx;
u-button{
width:45%;
}
}
}
}
</style>

@ -10,22 +10,7 @@
点击<text></text><text class="container-wx-big"></text><text></text>添加到我的小程序下次访问更快捷
</view>
</view>
<view class="container-swiper">
<swiper @change="changeCurrent" circular :current="current_swiper" :autoplay="false">
<swiper-item v-for="item in course_list" @click="toCourse(item.id)">
<image :src="item.image?item.image.url:''"/>
<view class="course_name">{{item.name}}</view>
</swiper-item>
</swiper>
<view class="container-swiper_current">
<image src="../../static/index_swiper_left.png" alt=""/>
<text class="bigFont">{{show_current_swiper}}</text>
<text>/{{course_list.length}}</text>
<image src="../../static/index_swiper_right.png" alt=""/>
</view>
</view>
<topBanner :banner_list="banner_list"></topBanner>
</view>
<view class="container-content">
<image src="../../static/index_bg.png" width="100%" height="100%"></image>
@ -72,10 +57,12 @@
</template>
<script>
import tabbar from '@/components/tabbar/tabbar.vue';
import tabbar from '@/components/tabbar/tabbar.vue';
import topBanner from '@/components/topBanner.vue'
export default {
components: {
tabbar
tabbar,
topBanner
},
data() {
return {
@ -84,10 +71,7 @@
backgroundColor: 'transparent'
},
showWx: true,
current_swiper: 0,
show_current_swiper: 1,
info_index: 0,
course_list:[],
banner_list:[],
notices_list:[]
}
},
@ -98,9 +82,8 @@
if (this.base.isNull(token)) {
this.getToken()
}
this.getCourseList()
this.getNoticesList()
this.getBannerList()
},
methods: {
changeCurrent(e) {
@ -130,17 +113,11 @@
}
});
},
async getCourseList(){
const res = await this.$u.api.courseIndex({
page:1,
page_size:5
})
this.course_list = res.data
},
toCourse(id){
uni.navigateTo({
url:'/packages/course/detail?id='+id
async getBannerList(){
const res = await this.$u.api.otherBanner({
position:1
})
this.banner_list = res
},
async getNoticesList(){
const res = await this.$u.api.courseNews({
@ -225,60 +202,6 @@
}
}
&-swiper {
width: 680rpx;
margin: 0 auto;
font-size: 0;
margin-top: 30rpx;
position: relative;
z-index: 99;
swiper {
width: 100%;
height: 380rpx;
swiper-item {
image {
width: 100%;
height: 100%;
}
}
}
.course_name{
font-size: 32rpx;
color: #ba9676;
position: absolute;
top: 20rpx;
left: 20rpx;
}
&_current {
font-size: 28rpx;
text-align: center;
color: #333333;
display: flex;
align-items: center;
justify-content: center;
margin-top: 28rpx;
image {
width: 28rpx;
height: 11rpx;
margin: 0 20rpx;
}
text {
margin-top: 10rpx;
}
.bigFont {
color: #b08c6c;
font-size: 40rpx;
margin-top: 0rpx;
margin-right: 10rpx;
}
}
}
&-content {
width: 100%;
position: relative;

@ -2,59 +2,76 @@
<view class="container">
<image class="cbg" src="../../static/common_bg.png"></image>
<view class="wrap">
<view class="me">{{userInfo.username?userInfo.username:'-'}}</view>
<view class="me">
<image class="me-top" src="../../static/me-top.png"></image>
<view class="me-name" @click="tourl(1)">
{{userInfo.username?userInfo.username:'-'}}
<u-icon name="arrow-right" size="32" style="margin-left:40rpx"></u-icon>
</view>
</view>
<view class="menu">
<view @click="tourl(1)"></view>
<view @click="tourl(2)"></view>
<view @click="tourl(3)"></view>
<view @click="showCard = true">电子校友卡</view>
<view @click="showGzh = true">关注公众号</view>
<view @click="tourl(2)">
<view>
<image src="../../static/me-icon1.png" style="width:52rpx;height:48rpx;"></image>
<text>我的课程</text>
</view>
<u-icon name="arrow-right" size="32" color="#666" style="margin-left:40rpx"></u-icon>
</view>
<view @click="tourl(3)">
<view>
<image src="../../static/me-icon2.png" style="width:50rpx;height:50rpx;"></image>
<text>我的预约</text>
</view>
<u-icon name="arrow-right" size="32" color="#666" style="margin-left:40rpx"></u-icon>
</view>
<view @click="showCard = true">
<view>
<image src="../../static/me-icon3.png" style="width:51rpx;height:46rpx;"></image>
<text>电子校友卡</text>
</view>
<u-icon name="arrow-right" size="32" color="#666" style="margin-left:40rpx"></u-icon>
</view>
<view @click="showGzh = true">
<view>
<image src="../../static/me-icon4.png" style="width:50rpx;height:47rpx;"></image>
<text>关注公众号</text>
</view>
<u-icon name="arrow-right" size="32" color="#666" style="margin-left:40rpx"></u-icon>
</view>
</view>
</view>
<!-- 校友卡 -->
<view class="modal-wrap" @click="showCard = false" v-if="showCard">
<image mode="widthFix" src="../../static/me-xyk.png"></image>
</view>
<!-- 校友卡 -->
<view class="modal-wrap" @click="showCard = false" v-if="showCard">
<image mode="widthFix" src="../../static/me-xyk.png"></image>
</view>
<!-- 公众号 -->
<view class="modal-wrap" @click="showGzh = false" v-if="showGzh">
<image mode="widthFix" src="../../static/me-gzh.png"></image>
<view class="modal-wrap" @click="showGzh = false" v-if="showGzh">
<image mode="widthFix" src="../../static/me-gzh.png"></image>
</view>
<!-- 进入后没有手机号的话 绑定 或者 注册 -->
<view class="modal">
<u-popup v-model="showRegister" mode="bottom">
<view class="modal-tip">提示</view>
<view class="modal-content">
<view>您还未绑定账号请先绑定</view>
<view>如您还不是我方校友请先注册</view>
</view>
<view class="modal-btn">
<u-button type="primary"
@click="showBind = true,showRegister=false,type='bind',form.is_bind=0">绑定</u-button>
<u-button type="primary"
@click="showBind = true,showRegister=false,type='register',form.is_bind=1">注册</u-button>
</view>
</u-popup>
</view>
<!-- 都需要手机验证码 -->
<view class="modal">
<u-popup v-model="showBind" mode="bottom">
<view class="modal-tip">手机验证</view>
<view class="modal-content">
<view>
<u-input v-model="form.mobile" placeholder="手机号" type="number" :maxlength="11" />
<view>
<view class="modal-tip">提示</view>
<view class="modal-content">
<view>您还未绑定账号请先绑定</view>
<view>如您还不是我方校友请先注册</view>
</view>
<view>
<u-input v-model="form.code" placeholder="验证码" />
<u-button size="mini" type="primary" @click="getSmsCode"></u-button>
<view class="modal-btn">
<u-button type="primary" @click="goBind"></u-button>
<u-button type="primary" @click="toRegister"></u-button>
<!-- <u-button type="primary"
@click="showBind = true,showRegister=false,type='bind',form.is_bind=0">绑定</u-button>
<u-button type="primary"
@click="showBind = true,showRegister=false,type='register',form.is_bind=1">注册</u-button>
-->
</view>
</view>
<view class="modal-btn">
<u-button type="primary" @click="toBind"></u-button>
</view>
</u-popup>
</view>
<tabbar :currentPage="3"></tabbar>
</view>
</template>
@ -69,18 +86,13 @@
return {
showRegister: false,
type: 'register',
showBind: false,
showGzh:false,
showCard:false,
form: {
mobile: '',
code: '',
is_bind: 1
},
showGzh: false,
showCard: false,
userInfo: {}
}
},
onShow() {
this.showRegister = false
this.getUserInfo()
},
onLoad() {
@ -114,56 +126,18 @@
}
})
},
//
getSmsCode() {
if (this.base.isNull(this.form.mobile)) {
this.base.toast('手机号码不能为空')
return
}
if (!this.base.isMobile(this.form.mobile)) {
this.base.toast('手机号码错误')
return
}
this.$u.api.sendSms({
mobile: this.form.mobile
}).then(res => {
this.base.toast("发送成功")
//
goBind() {
console.log("qwe")
uni.navigateTo({
url: '/packages/register/login'
})
},
//
toBind() {
if (this.base.isNull(this.form.mobile)) {
this.base.toast('手机号码不能为空')
return
}
if (!this.base.isMobile(this.form.mobile)) {
this.base.toast('手机号码错误')
return
}
if (this.base.isNull(this.form.code)) {
this.base.toast('验证码不能为空')
return
}
this.$u.api.bindMobile({
mobile: this.form.mobile,
code: this.form.code,
is_bind: this.form.is_bind
}).then(res => {
this.base.toast("绑定成功")
this.showBind = false
// if(this.type=='bind'){
// this.getUserInfo()
// }else if(this.type=='register'){
// uni.navigateTo({
// url:'/packages/register/index'
// })
// }
// uni.navigateTo({
// url:'/packages/apply/index?id='+this.course_id
// })
//
toRegister() {
uni.navigateTo({
url: '/packages/register/index'
})
},
}
@ -171,38 +145,87 @@
</script>
<style scoped lang="scss">
.container {
padding: 30rpx;
width:100%;
height:100vh;
.cbg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100vh;
}
.wrap{
position: relative;
.me{
background-color: #ceab8a;
padding:30rpx;
text-align: center;
color:#fff;
border-radius: 20rpx;
}
.menu{
&>view{
padding:20rpx;
.container {
padding: 30rpx;
width: 100%;
height: 100vh;
.cbg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100vh;
}
.wrap {
position: relative;
height: calc(100% - 60rpx);
.me {
width: 690rpx;
height: 435rpx;
position: relative;
&-top {
width: 690rpx;
height: 435rpx;
}
&-name {
color: #fff;
font-size: 32rpx;
position: absolute;
top: 120rpx;
left: 30rpx;
}
}
// .me{
// background-color: #ceab8a;
// padding:30rpx;
// text-align: center;
// color:#fff;
// border-radius: 20rpx;
// }
.menu {
position: absolute;
top: 240rpx;
width: 100%;
background-color: #fff;
// z-index: 999;
border-radius: 40rpx 40rpx 0 0;
height: calc(100% - 240rpx);
padding: 40rpx;
&>view {
padding: 30rpx;
color:#666;
border-bottom: 1px solid #ddd;
display: flex;
align-items: center;
justify-content: space-between;
&>view:first-child{
display: flex;
align-items: center;
text{
margin-left:20rpx
}
}
}
}
}
}
.modal {
::v-deep .u-drawer-bottom {
border-radius: 40rpx;
}
&-tip {
text-align: center;
padding: 30rpx;
font-size: 28rpx;
font-size: 32rpx;
}
&-content {
@ -219,21 +242,23 @@
width: 45%;
}
}
}
.modal-wrap{
position: fixed;
top:0;
left:0;
width:100%;
height:100vh;
background-color: rgba(0,0,0,0.6);
&>image{
width:90%;
position: absolute;
top:50%;
left:50%;
transform: translate(-50%,-50%);
}
}
.modal-wrap {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100vh;
background-color: rgba(0, 0, 0, 0.6);
&>image {
width: 90%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 390 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1015 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 932 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 716 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 754 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 565 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 746 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Loading…
Cancel
Save