更新修改

master
lion 1 year ago
parent 8543f6a2be
commit 55994c3910

@ -152,28 +152,34 @@
},
onUploaded(lists, name, item) {
let arr = []
let arrid = []
if (lists.length > 0) {
this.base.toast("全部上传成功")
lists.map(item => {
arr.push(item.response.url.replace(baseUrl, ''))
arrid.push(item.response)
})
}
this.course_forms.map(item1 => {
if (item1.field === item.field) {
this.$set(item1, 'value', arr.join(","))
this.$set(item1, 'fileList', arrid)
}
})
},
onRemove(index, lists, name, item) {
let arr = []
let arrid = []
if (lists.length > 0) {
lists.map(item => {
arr.push(item.response.url.replace(baseUrl, ''))
arrid.push(item.response)
})
}
this.course_forms.map(item1 => {
if (item1.field === item.field) {
this.$set(item1, 'value', arr.join(","))
this.$set(item1, 'fileList', arrid)
}
})
},

@ -166,6 +166,9 @@
if(item.belong_user===1){
item.value = this.form[item.field]
}
if(item.value===null){
item.value = ''
}
})
this.course_forms = res.course_forms.sort((a,b)=>(a.sort-b.sort))
}
@ -175,11 +178,12 @@
backForm(e) {
let _arr = []
e.map(item => {
_arr.push({
name: item.name,
field: item.field,
value: item.value ? item.value : ''
})
// _arr.push({
// name: item.name,
// field: item.field,
// value: item.value ? item.value : ''
// })
_arr.push(item)
//
if (item.belong_user === 1 && !this.base.isNull(item.value)) {
this.form[item.field] = item.value

@ -23,14 +23,17 @@
<u-form-item label="车牌" prop="plate">
<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)"/>
<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" :disabled="isTotal" :type="isTotal?'':'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>
@ -55,9 +58,7 @@
<u-picker @confirm="dateConfirm" mode="time" v-model="dateShow" :params="dateParams"></u-picker>
<timeSlot ref="timeslot" :title="'选择时间段'"
:min="hMin" :max="hMax"
@confirm="confirmTime"></timeSlot>
<timeSlot ref="timeslot" :title="'选择时间段'" :min="hMin" :max="hMax" @confirm="confirmTime"></timeSlot>
<u-picker @confirm="siteConfirm" v-model="siteShow" :range="siteList" range-key="name"
mode="selector"></u-picker>
@ -66,7 +67,8 @@
<u-popup v-model="showPlate" mode="bottom">
<view class="modal-tip">车牌号</view>
<view class="modal-content" style="height:400rpx">
<plate ref="plates" @listenPlateChange="(val)=>{plateChange(val,index)}" :defaultPlate="plateNumber" />
<plate ref="plates" @listenPlateChange="(val)=>{plateChange(val,index)}"
:defaultPlate="plateNumber" />
</view>
<view class="form-btn" @click="confirmPlate">
<view type="primary">确认</view>
@ -91,6 +93,20 @@
</view>
</u-popup>
</view>
<!-- 预约须知 -->
<u-modal v-model="showTips" negative-top="400" :show-cancel-button="false" :show-confirm-button="false"
:show-title="false">
<view class="slot-content">
<view class="slot-content-title">预约须知</view>
<view class="slot-content-input">
<view>1使用权限仅限校友本人使用不可代为预约否则取消预约资格</view>
<view>2图书馆禁止饮食抽烟</view>
</view>
<view class="slot-content-btn" style="padding-top:30rpx">
<view @click="confirmTips = true,showTips=false">我已知晓</view>
</view>
</view>
</u-modal>
</view>
</template>
@ -107,6 +123,8 @@
data() {
return {
dateShow: false,
showTips: false,
confirmTips: false,
hMin: 0,
hMax: 24,
appoinementType: '',
@ -276,8 +294,8 @@
this.base.toast("请输入车牌号")
return
}
if(this.base.isNull(this.plateList[this.plateIndex]['plate'])
|| this.plateList[this.plateIndex]['plate'].length<7){
if (this.base.isNull(this.plateList[this.plateIndex]['plate']) ||
this.plateList[this.plateIndex]['plate'].length < 7) {
this.base.toast("请输入正确的车牌号")
return
}
@ -340,6 +358,10 @@
// })
this.$refs.uForm.validate(valid => {
if (valid) {
if(!this.confirmTips){
this.showTips = true
return
}
start_time = this.form.date + ' ' + this.form.start_time + ':00'
end_time = this.form.date + ' ' + this.form.end_time + ':00'
this.form.accompany_total = this.form.accompany.length
@ -382,12 +404,12 @@
if (res.subscriptionsSetting.itemSettings && res.subscriptionsSetting.itemSettings[
'0WMaFZ_0FOS5gtxEAi-fM3pFcYPySRMwYFNASz9oig0'] === 'accept') {
//
that.base.toast("预约已提交",2000,function(){
that.base.toast("预约已提交", 1500, function() {
setTimeout(function() {
uni.redirectTo({
url: '/packages/mybook/index'
})
},2000)
}, 1000)
})
} else {
//
@ -401,31 +423,31 @@
'0WMaFZ_0FOS5gtxEAi-fM3pFcYPySRMwYFNASz9oig0',
],
success(res) {
that.base.toast("预约已提交",2000,function(){
that.base.toast("预约已提交", 1500, function() {
setTimeout(function() {
uni.redirectTo({
url: '/packages/mybook/index'
})
},2000)
}, 1000)
})
},
fail(err) {
that.base.toast("预约已提交",2000,function(){
that.base.toast("预约已提交", 1500, function() {
setTimeout(function() {
uni.redirectTo({
url: '/packages/mybook/index'
})
},2000)
}, 1000)
})
}
})
} else {
that.base.toast("预约已提交",2000,function(){
that.base.toast("预约已提交", 1500, function() {
setTimeout(function() {
uni.redirectTo({
url: '/packages/mybook/index'
})
},2000)
}, 1000)
})
}
}
@ -433,12 +455,12 @@
}
} else {
that.base.toast("预约已提交",2000,function(){
that.base.toast("预约已提交", 1500, function() {
setTimeout(function() {
uni.redirectTo({
url: '/packages/mybook/index'
})
},2000)
}, 1000)
})
//
}
@ -454,6 +476,7 @@
padding: 30rpx;
width: 100%;
height: 100vh;
.cbg {
position: absolute;
top: 0;
@ -461,6 +484,7 @@
width: 100%;
height: 100vh;
}
.wrap {
background: #fff;
position: relative;
@ -470,10 +494,48 @@
height: 100%;
overflow: scroll;
}
.slot-content {
padding: 30rpx;
padding-top: 20rpx;
&>view {
padding-top: 20rpx;
}
&-title {
text-align: center;
}
&-input {
height: 300rpx;
line-height: 1.6;
overflow: scroll;
}
&-btn {
display: flex;
align-items: center;
justify-content: space-between;
padding: 30rpx 0;
&>view {
width: 40%;
text-align: center;
margin: 0 auto;
color: #fff;
background: linear-gradient(to right, #5e5fbc, #0d0398);
border-radius: 30rpx;
padding: 10rpx;
}
}
}
.form-btn {
width: 100%;
position: relative;
padding: 60rpx 0;
// z-index:9999;
&>view {
width: 70%;
@ -485,6 +547,7 @@
padding: 20rpx;
}
}
.modal {
::v-deep .u-drawer-bottom {
border-radius: 40rpx;

@ -12,14 +12,14 @@
<view class="wrap-status-name">{{userInfo.username}}:</view>
<view class="wrap-status-content">{{info.reason?info.reason:pass_tip}}</view>
<!-- v-if="courseInfo.is_fee===1 && info.fee_status!=1" -->
<view class="wrap-status-btn">
<view v-if="info.files && info.files.length>0" @click="openFiles(info.files)"></view>
<view class="wrap-status-btn" v-if="info.files && info.files.length>0">
<view @click="openFiles(info.files)"></view>
</view>
<view class="wrap-status-btn">
<view @click="toPay" v-if="courseInfo.is_fee===1 && info.fee_status!=1"></view>
<view class="wrap-status-btn" v-if="courseInfo.is_fee===1 && info.fee_status!=1">
<view @click="toPay"></view>
</view>
<view class="wrap-status-btn">
<view @click="showCancel = true">我要放弃</view>
<view class="wrap-status-btn" @click="showCancel = true">
<view>我要放弃</view>
</view>
</view>
<view v-else-if="info.status===2">
@ -122,6 +122,20 @@
this.base.toast("请输入放弃原因")
return
}
this.$u.api.courseUpdateSign({
id:this.info.id,
giveup_reason:this.form.giveup_reason,
status:5
}).then(res => {
that.base.toast("已放弃课程", 1500, function() {
this.showCancel = false
setTimeout(function() {
uni.redirectTo({
url:"/packages/mycourse/index"
})
}, 500)
})
})
},
openFiles(files) {
console.log("files", files)

@ -3,7 +3,7 @@
<image class="cbg" :src="base.imgHost('common_bg.png')"></image>
<view class="wrap">
<view v-if="teacher">
<view class="teacher">
<view class="teacher" v-for="tea in teacher">
<view>
<image style="width:97rpx;height:97rpx;margin-right:30rpx"
:src="base.imgHost('txl-teacher.png')"></image>
@ -11,14 +11,14 @@
<view>
<view class="teacher-name">
<view style="display: flex;align-items: center;">
<text>{{teacher.name}}</text>
<text>{{tea.name}}</text>
<text class="courseName">班主任</text>
</view>
</view>
<view class="teacher-mobile">
<image style="width:22rpx;height:22rpx;margin-right:20rpx"
:src="base.imgHost('txl-phone.png')"></image>
<view>{{teacher.mobile?teacher.mobile:''}}</view>
<view>{{tea.mobile?tea.mobile:''}}</view>
</view>
</view>
</view>
@ -38,9 +38,9 @@
<text class="courseName">{{item.course_signs[0]['position']}}</text>
</view>
</view>
<view class="teacher-company">{{item.company_name}}</view>
<view class="teacher-company">{{item.company_position}}</view>
<view v-if="show_mobile" class="teacher-company">{{item.mobile}}</view>
<view class="teacher-company">{{item.company_name?item.company_name:''}}</view>
<view class="teacher-company">{{item.company_position?item.company_position:''}}</view>
<view v-if="show_mobile" class="teacher-company">{{item.mobile?item.mobile:''}}</view>
<!-- <view class="teacher-mobile">
<view style="font-size:24rpx;color:#999;margin-bottom:10rpx">如需联系方式请联系班主任</view>
</view> -->
@ -69,7 +69,7 @@
data() {
return {
list: [],
teacher: null,
teacher: [],
studentList: [],
show_mobile: false,
}

@ -46,17 +46,17 @@
</u-button>
</view>
<view class="list-item-btn">
<text @click="toUrl(item.id,3)"
<text @click="toUrl(item,3)"
v-if="item.course_signs[0]['status']===1 && item.is_fee===0">进入</text>
<text @click="toUrl(item.id,1)"
<text @click="toUrl(item,1)"
v-if="item.course_signs[0]['status']===1 && item.is_fee===1">进入</text>
<!-- 待审核 备选 -->
<text @click="cancelSign(item)" style="margin-right:20rpx;color:#999999"
v-if="item.course_signs[0]['status']===0||item.course_signs[0]['status']===3">取消报名</text>
<text @click="toUrl(item.id,2)"
<text @click="toUrl(item,2)"
v-if="item.course_signs[0]['status']===0||item.course_signs[0]['status']===3">查看进度</text>
<!-- 审核不通过 -->
<text @click="toUrl(item.id,2)" v-if="item.course_signs[0]['status']===2"></text>
<text @click="toUrl(item,2)" v-if="item.course_signs[0]['status']===2"></text>
</view>
</view>
</view>
@ -148,22 +148,29 @@
clickShareId(item) {
this.shareObj = item
},
toUrl(id, type) {
toUrl(item, type) {
//
if (type === 1) {
uni.navigateTo({
url: '/packages/mycourse/detail?id=' + id
url: '/packages/mycourse/detail?id=' + item.id
})
} else if (type === 2) {
//
uni.navigateTo({
url: '/packages/mycourse/courseStatus?id=' + id
url: '/packages/mycourse/courseStatus?id=' + item.id
})
} else if (type === 3) {
//
//
if(!this.base.isNull(item.qun_image_id)){
uni.navigateTo({
url: '/packages/course/freeDetail?id=' + id
url: '/packages/course/freeDetail?id=' + item.id
})
}else{
uni.navigateTo({
url: '/packages/mycourse/courseStatus?id=' + item.id
})
}
}
},
@ -184,6 +191,17 @@
},
submitCancel(item){
console.log("item",item)
let that = this
this.$u.api.courseUpdateSign({
id:item.course_signs[0].id,
status:4
}).then(res => {
that.base.toast("已取消课程", 1500, function() {
setTimeout(function() {
that.getMyCourse()
}, 500)
})
})
},
async getBannerList() {
const res = await this.$u.api.otherBanner({

@ -3,11 +3,11 @@
<image class="cbg" :src="base.imgHost('book-bg.png')"></image>
<view class="schoolmate btn">
<image mode="widthFix" @click="toUrl(2)" :src="base.imgHost('book-schoolmate1.png')"></image>
<view>加入我们</view>
<!-- <view>加入我们</view> -->
</view>
<view class="book btn">
<image mode="widthFix" @click="toUrl(1)" :src="base.imgHost('book-book1.png')"></image>
<view>立即预约</view>
<!-- <view>立即预约</view> -->
</view>
<tabbar :currentPage="2"></tabbar>
</view>
@ -79,6 +79,9 @@
})
} else {
this.base.toast("您还不是校友,无权查看")
uni.switchTab({
url: '/pages/course/index'
})
}
}

@ -3,7 +3,8 @@
<image class="cbg" :src="base.imgHost('common_bg.png')"></image>
<!-- <view> -->
<scroll-view :scroll-y="true" @scrolltolower="scrollGet" class="list">
<topBanner v-if="banner_list.length>0" :banner_list="banner_list"></topBanner>
<!-- <topBanner v-if="banner_list.length>0" :banner_list="banner_list"></topBanner> -->
<image @click="goCourse" class="list-img" :src="base.imgHost('course-top.png')"></image>
<view v-if="hasData" style="padding-bottom: 200rpx;">
<!-- 10进行中 40已结束 -->
<view class="list-item" :class="{'list-end':item.sign_status===40}" v-for="item in course_list">
@ -129,7 +130,7 @@
}
},
onLoad() {
this.getBannerList()
// this.getBannerList()
this.getCourseList()
},
@ -148,6 +149,11 @@
},
methods: {
goCourse(){
uni.navigateTo({
url:'/packages/mycourse/index'
})
},
scrollGet() {
if (!this.hasData) {
return
@ -294,6 +300,7 @@
.list {
height: 100vh;
padding:30rpx 0;
position: relative;
top: 0;
left: 0;
@ -305,7 +312,12 @@
left: 50%;
transform: translate(-50%, -50%);
}
&-img {
width: calc(100% - 60rpx);
height: 125rpx;
display: block;
margin: 0 auto;
}
&-item {
margin: 30rpx;
background-color: #fff;

@ -17,15 +17,15 @@
<view class="container-content">
<image :src="base.imgHost('index_bg.png')" width="100%" height="100%"></image>
<view class="container-content-icons">
<view @click="tourl(1)">
<image :src="base.imgHost('index_icon2.png')"></image>
</view>
<view @click="tourl(2)">
<image :src="base.imgHost('index_icon3.png')"></image>
</view>
<view @click="tourl(3)">
<image :src="base.imgHost('index_icon4.png')"></image>
</view>
<view @click="tourl(1)">
<image :src="base.imgHost('index_icon21.png')"></image>
</view>
</view>
<view class="container-content-info">
@ -180,8 +180,11 @@
},
tourl(type, url) {
if (type === 1) {
// uni.navigateTo({
// url: '/packages/webview/index?type=1'
// })
uni.navigateTo({
url: '/packages/webview/index?type=1'
url:'/packages/mycourse/index'
})
} else if (type === 2) {
uni.switchTab({

@ -15,7 +15,7 @@
</view>
<view class="usersigns" v-if="course_signs.length>0">
<text>学籍</text>
<text>{{course_signs[0]['course'].year?course_signs[0]['course'].year+'年':''}}{{course_signs[0]['course'].type_detail?course_signs[0]['type_detail'].name+"|":''}}{{course_signs[0]['course'].name}}</text>
<text>{{course_signs[0]['course'].year?course_signs[0]['course'].year+'年':''}}{{course_signs[0]['course'].type_detail?course_signs[0]['course']['type_detail'].name+"|":''}}{{course_signs[0]['course'].name}}</text>
</view>
</view>
<view class="usercode">
@ -87,7 +87,7 @@
<view class="modal-wrap" v-if="showCard">
<view class="modal-image">
<view class="modal-close" @click="showCard = false">X</view>
<image mode="widthFix" :src="base.imgHost('me-xyk.png')"></image>
<image mode="widthFix" :src="base.imgHost('me-xyk1.png')"></image>
</view>
<view class="modal-xyk">
@ -111,7 +111,7 @@
</view>
<view class="modal-xyk-name-course" v-if="course_signs.length>0">
<text>学籍</text>
<text>{{course_signs[0]['course'].year?course_signs[0]['course'].year+'年':''}}{{course_signs[0]['course'].type_detail?course_signs[0]['type_detail'].name+"|":''}}{{course_signs[0]['course'].name}}</text>
<text>{{course_signs[0]['course'].year?course_signs[0]['course'].year+'年':''}}{{course_signs[0]['course'].type_detail?course_signs[0]['course']['type_detail'].name+"|":''}}{{course_signs[0]['course'].name}}</text>
</view>
</view>

Loading…
Cancel
Save