123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246 |
- <template>
- <view style="padding-bottom: 50rpx;">
- <view class="pagebg">
- <view class="" style="width: 100%;height: 400rpx;">
- <swiper :indicator-dots="false" :autoplay="true" :interval="3000" :duration="500" style="width: 100%;height: 100%;">
- <swiper-item v-for="(item,index) in swiperList" :key="index">
- <image :src="item.imageUrl" style="width: 100%;height: 100%;" mode=""></image>
- </swiper-item>
- </swiper>
- </view>
- <view class="content">
- <view class="box">
- <view>
- <view class="text-bold" style="color: #333333;">您的姓名</view>
- <view class="inutline">
- <u-input v-model="form.applyName" type="text" placeholder="请输入真实姓名"
- inputAlign="text-align:left" />
- </view>
- </view>
- <view class="margin-top">
- <view class="text-bold" style="color: #333333;">您的年龄</view>
- <view class="inutline">
- <u-input v-model="form.applyAge" type="text" placeholder="请输入年龄"
- inputAlign="text-align:left" />
- </view>
- </view>
- <view class="margin-top">
- <view class="text-bold" style="color: #333333;">联系电话</view>
- <view class="inutline">
- <u-input v-model="form.applyPhone" type="text" placeholder="请输入联系电话"
- inputAlign="text-align:left" />
- </view>
- </view>
- <view class="margin-top">
- <view class="text-bold" style="color: #333333;">报考课程</view>
- <view class="">
- <u-input v-model="form.applyContent" type="text" placeholder="请输入报考课程"
- inputAlign="text-align:left" />
- </view>
- </view>
- </view>
- <view v-if="form.status==3&&form.auditContent">拒绝理由:{{form.auditContent}}</view>
- <view class="btn" v-if="form.status==1||form.status==3" @click="submit()">修改</view>
- <view class="btn" v-else @click="submit()">提交</view>
-
- </view>
- </view>
- <view class="text flex justify-center">
- <view class="text-box" v-html="value">
- <!-- {{value}} -->
- </view>
-
- </view>
-
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- form: {
- applyName: '',
- applyPhone: '',
- applyAge: '',
- applyContent: '',
- classify:1
- },
- userId: '',
- value:'',
- swiperList:[]
- }
- },
- onLoad() {
- this.userId = uni.getStorageSync('userId')
- this.getSwiperList();
- if(this.userId){
- this.getDetails()
- this.$Request.get('/app/common/type/316').then(res => {
- if (res.code == 0) {
- this.value = res.data.value
- }
- });
- }
- },
- onShow() {
- },
- methods: {
- //获取轮播图
- getSwiperList() {
- this.$Request.get("/app/banner/selectBannerList", {
- classify: 7
- }).then(res => {
- if (res.code == 0) {
- this.swiperList = res.data
- }
- });
- },
- getDetails() {
- let data = {
- classify: 1
- }
- this.$Request.get('/app/apply/selectApplyByUserIdAndClassify', data).then(res => {
- if (res.code == 0 && res.data) {
- this.form = res.data
- }
- })
- },
- submit() {
- if(this.userId==''){
- uni.showModal({
- title: '提示',
- content: '您还未登录,请先登录',
- success: function(res) {
- if (res.confirm) {
- console.log('用户点击确定');
- uni.navigateTo({
- url: '/pages/public/login'
- })
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- })
- return
- }
- if (!this.form.applyName) {
- uni.showToast({
- title: '请输入真实姓名',
- icon: 'none',
- duration: 1000
- })
- return;
- }
- if (!this.form.applyAge) {
- uni.showToast({
- title: '请输入年龄',
- icon: 'none',
- duration: 1000
- })
- return;
- }
- if (!this.form.applyPhone) {
- uni.showToast({
- title: '请输入联系电话',
- icon: 'none',
- duration: 1000
- })
- return;
- }
- if (!this.form.applyContent) {
- uni.showToast({
- title: '请输入报考证书',
- icon: 'none',
- duration: 1000
- })
- return;
- }
- if(this.form.status ==1||this.form.status==3){
- this.$Request.postJson('/app/apply/updateApply', this.form).then(res => {
- if (res.code == 0) {
- uni.showToast({
- title: '修改成功!',
- icon: 'none'
- })
- setTimeout(function() {
- uni.switchTab({
- url:'/pages/index/index'
- })
- }, 1000)
- }
- })
- }else{
- this.$Request.postJson('/app/apply/insertApply', this.form).then(res => {
- if (res.code == 0) {
- uni.showToast({
- title: '提交成功!',
- icon: 'none'
- })
- setTimeout(function() {
- uni.switchTab({
- url:'/pages/index/index'
- })
- }, 1000)
- }
- })
- }
-
- }
- }
- }
- </script>
- <style lang="less">
- page{
- background-color: #82a9fe;
- }
- .text{
- margin-top: 50rpx;
- width: 100%;
- .text-box{
- width: 686rpx;
- text-align: center;
- }
- }
- .pagebg {
- width: 100%;
- }
- .pagebg image {
- width: 100%;
- height: 100%;
- }
- .content {
- z-index: 99;
- margin: 30upx 30upx;
- }
- .box {
- background: #FFFFFF;
- border: 4upx solid #000000;
- border-radius: 20upx;
- padding: 30upx;
- }
- .inutline {
- border-bottom: 1rpx solid #E9E9E9;
- }
- .btn{
- background: #FFFFFF;
- border-radius: 10upx;
- text-align: center;
- margin-top: 30upx;
- padding: 30upx;
- color: #000000;
- font-weight: bold;
- letter-spacing: 2rpx;
- }
-
- </style>
|