master
lion 2 years ago
parent 748b9cd3e4
commit 82706cdf2f

@ -68,7 +68,7 @@ const base = {
return regex.test(phoneNumber);
},
// 分享
shareInfo : ()=> {
shareInfo : () => {
return{
title:"苏州科技商学院",
imageUrl:"/static/share.jpg"

@ -38,7 +38,10 @@
this.show_current_swiper = e.detail.current + 1
},
toCourse(item){
uni.switchTab({
// uni.switchTab({
// url:item.jump_url
// })
uni.navigateTo({
url:item.jump_url
})
}

@ -0,0 +1,323 @@
<template>
<view class="container">
<image class="cbg" :src="base.imgHost('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="['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>
<!-- <u-divider>报名信息</u-divider> -->
<applyForm ref="applyForm" @backForm="backForm" :course_forms="course_forms"></applyForm>
</view>
<!-- <view class="form-btn">
<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>
<script>
import applyForm from "@/components/applyForm/index.vue"
export default {
components: {
applyForm
},
data() {
return {
course_id: '',
showPosition: false,
positionList: [],
dateShow: false,
is_fee:0, //
dateParams: {
year: true,
month: true,
day: true,
hour: false,
minute: false,
second: false
},
form: {},
apply_form: [],
course_forms: [],
showSex: false,
sexList: [{
label: '男',
value: '男'
}, {
label: '女',
value: '女'
}],
rules: {
username: [{
required: true,
message: '请输入姓名',
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'],
}],
}
}
},
onReady() {
this.$refs.uForm.setRules(this.rules);
},
onLoad(options) {
this.course_id = options.id
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({
course_id: id
})
if (res.course_forms && res.course_forms.length > 0) {
this.course_forms = res.course_forms
}
this.is_fee = res.is_fee
},
backForm(e) {
console.log("e", e)
let _arr = []
e.map(item => {
_arr.push({
name: item.name,
field: item.field,
value: item.value?item.value:''
})
//
if(item.belong_user===1){
this.form[item.field] = item.value
}
})
this.apply_form = _arr
console.log("this.apply_form", this.apply_form,this.form)
// return
this.$refs.uForm.validate(valid => {
if (valid) {
// this.saveUser()
this.applyCourse()
} else {
console.log('验证失败');
// this.base.toast("")
}
});
},
saveUser() {
let that = this
this.$u.api.saveUser(this.form).then(res => {
console.log("user")
this.$u.api.user().then(res => {
this.$u.vuex('vuex_user', res.user)
if(that.is_fee){
that.newsSubscription()
}else{
console.log("123")
uni.redirectTo({
url: '/packages/mycourse/index'
})
}
})
}).then(res=>{
if(that.is_fee){
that.newsSubscription()
}else{
uni.redirectTo({
url: '/packages/mycourse/index'
})
}
})
},
applyCourse() {
let that = this
// let that = this
this.$u.api.courseSign({
course_id: this.course_id,
data: this.apply_form
}).then(res => {
this.base.toast("报名成功",2000,function(){
if(that.is_fee){
that.newsSubscription()
}else{
uni.redirectTo({
url: '/packages/mycourse/index'
})
}
})
})
},
//
newsSubscription() {
let that = this
uni.getSetting({
withSubscriptions: true, //false
success(res) {
console.log("res123",res)
if (res.authSetting['scope.subscribeMessage']) {
console.log("res.auth")
uni.redirectTo({
url: '/packages/mycourse/index'
})
} else {
console.log("no setting")
//
uni.requestSubscribeMessage({
tmplIds: ['6bkRNahvR88pG4Tpk0c2aY81kszvFpdaIV-CdC_ENTM','CCEUrg9t8aW40NEDoqEk7NY7pyllW_0GEHfjwg_DF6A',
'0WMaFZ_0FOS5gtxEAi-fM3pFcYPySRMwYFNASz9oig0'],
success(res) {
that.base.toast("订阅成功",1500,function(){
uni.redirectTo({
url: '/packages/mycourse/index'
})
})
},
fail(err){
console.log(err)
uni.redirectTo({
url: '/packages/mycourse/index'
})
}
})
}
}
});
},
}
}
</script>
<style scoped lang="scss">
.container {
padding: 30rpx;
height: 100vh;
.cbg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100vh;
}
.wrap {
background-color: #fff;
padding: 20rpx 50rpx;
border-radius: 20rpx;
position: relative;
height: 100%;
overflow: scroll;
}
.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: linear-gradient(to right, #5e5fbc, #0d0398);
border-radius: 30rpx;
padding: 20rpx;
}
}
}
</style>

@ -53,8 +53,8 @@
course_id: '',
showPosition: false,
positionList: [],
dateShow: false,
is_fee:0, //
dateShow: false,
is_fee: 0, //
dateParams: {
year: true,
month: true,
@ -141,21 +141,21 @@
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
})
},
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({
@ -163,9 +163,9 @@
})
if (res.course_forms && res.course_forms.length > 0) {
this.course_forms = res.course_forms
}
this.is_fee = res.is_fee
}
this.is_fee = res.is_fee
},
backForm(e) {
console.log("e", e)
@ -174,93 +174,142 @@
_arr.push({
name: item.name,
field: item.field,
value: item.value?item.value:''
})
//
if(item.belong_user===1){
this.form[item.field] = item.value
value: item.value ? item.value : ''
})
//
if (item.belong_user === 1) {
this.form[item.field] = item.value
}
})
this.apply_form = _arr
console.log("this.apply_form", this.apply_form,this.form)
// return
this.$refs.uForm.validate(valid => {
if (valid) {
// this.saveUser()
this.applyCourse()
} else {
console.log('验证失败');
// this.base.toast("")
}
console.log("this.apply_form", this.apply_form, this.form)
// return
this.$refs.uForm.validate(valid => {
if (valid) {
this.saveUser()
this.applyCourse()
} else {
console.log('验证失败');
// this.base.toast("")
}
});
},
saveUser() {
async saveUser() {
let that = this
this.$u.api.saveUser(this.form).then(res => {
console.log("user")
this.$u.api.user().then(res => {
this.$u.vuex('vuex_user', res.user)
if(that.is_fee){
that.newsSubscription()
}else{
uni.redirectTo({
url: '/packages/mycourse/index'
})
}
})
}).then(res=>{
if(that.is_fee){
that.newsSubscription()
}else{
uni.redirectTo({
url: '/packages/mycourse/index'
})
}
await this.$u.api.saveUser(this.form).then(res => {
console.log("user")
// this.$u.api.user().then(res => {
// this.$u.vuex('vuex_user', res.user)
// })
})
},
applyCourse() {
async applyCourse() {
let that = this
this.$u.api.courseSign({
// let that = this
await this.$u.api.courseSign({
course_id: this.course_id,
data: this.apply_form
}).then(res => {
this.base.toast("报名成功",2000,function(){
setTimeout(function(){
that.saveUser()
},1500)
})
if (this.is_fee) {
this.newsSubscription()
} else {
this.base.toast("报名成功",1500,function(){
setTimeout(function(){
uni.redirectTo({
url: '/packages/mycourse/index'
})
},1500)
})
}
})
},
},
//
newsSubscription() {
console.log("yesssss")
let that = this
uni.getSetting({
withSubscriptions: true, //false
success(res) {
if (res.authSetting['scope.subscribeMessage']) {
uni.redirectTo({
url: '/packages/mycourse/index'
})
} else {
//
uni.requestSubscribeMessage({
tmplIds: ['6bkRNahvR88pG4Tpk0c2aY81kszvFpdaIV-CdC_ENTM','CCEUrg9t8aW40NEDoqEk7NY7pyllW_0GEHfjwg_DF6A',
'0WMaFZ_0FOS5gtxEAi-fM3pFcYPySRMwYFNASz9oig0','XsR1BJRdE8JtFUC1o3w7DDcscXkCEGu62J8_smMofZI'],
success(res) {
that.base.toast("订阅成功",1500,function(){
console.log("resdfg", res)
if (res.subscriptionsSetting.mainSwitch) {
if (res.subscriptionsSetting.itemSettings && res.subscriptionsSetting.itemSettings[
'6bkRNahvR88pG4Tpk0c2aY81kszvFpdaIV-CdC_ENTM'] === 'accept' &&
res.subscriptionsSetting.itemSettings[
'XsR1BJRdE8JtFUC1o3w7DDcscXkCEGu62J8_smMofZI'] === 'accept'
) {
console.log("accept")
//
that.base.toast("报名成功", 1500, function() {
setTimeout(function(){
uni.redirectTo({
url: '/packages/mycourse/index'
})
},1500)
})
} else {
//
uni.showModal({
title: '订阅消息',
content: '是否需要订阅预约结果消息',
success(res1) {
if (res1.confirm) {
uni.requestSubscribeMessage({
tmplIds: [
'6bkRNahvR88pG4Tpk0c2aY81kszvFpdaIV-CdC_ENTM',
'XsR1BJRdE8JtFUC1o3w7DDcscXkCEGu62J8_smMofZI',
],
success(res) {
that.base.toast("报名成功", 1500, function() {
setTimeout(function(){
uni.redirectTo({
url: '/packages/mycourse/index'
})
},1500)
})
},
fail(err) {
that.base.toast("报名成功", 1500, function() {
setTimeout(function(){
uni.redirectTo({
url: '/packages/mycourse/index'
})
},1500)
})
}
})
} else {
that.base.toast("报名成功", 1500, function() {
setTimeout(function(){
uni.redirectTo({
url: '/packages/mycourse/index'
})
},1500)
})
}
}
})
}
} else {
console.log("9999")
that.base.toast("报名成功", 1500, function() {
setTimeout(function(){
uni.redirectTo({
url: '/packages/mycourse/index'
})
}
},1500)
})
//
}
}
});
});
},
}
}
@ -283,9 +332,9 @@
background-color: #fff;
padding: 20rpx 50rpx;
border-radius: 20rpx;
position: relative;
height: 100%;
overflow: scroll;
position: relative;
height: 100%;
overflow: scroll;
}
.form-btn {
@ -296,12 +345,12 @@
padding: 20rpx 0;
&>view {
width: 70%;
text-align: center;
margin: 0 auto;
color: #fff;
background: linear-gradient(to right, #5e5fbc, #0d0398);
border-radius: 30rpx;
width: 70%;
text-align: center;
margin: 0 auto;
color: #fff;
background: linear-gradient(to right, #5e5fbc, #0d0398);
border-radius: 30rpx;
padding: 20rpx;
}
}

@ -214,6 +214,7 @@
if(val.length>=7){
this.plateList[this.plateIndex]['plate'] = val.join("")
}
console.log(this.plateList[this.plateIndex])
},
openPlate(index){
@ -238,6 +239,7 @@
this.showPlate=false
this.plateList[this.plateIndex]['show'] = true
this.plateIndex= -1
this.plateNumber = ['苏', 'E', '', '', '', '', '']
},
//
addAccompany() {
@ -290,30 +292,26 @@
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
let _plate = ''
console.log("accompany_total",this.plateList,this.form)
let _plate = []
if(this.plateList.length>0){
if(this.plateList.length>this.form.accompany_total+1){
if(this.plateList.length>this.form.accompany_total + 1){
this.base.toast("车辆数量已经大于预约人数了")
return
}
_plate = this.plateList.join(',')
// this.plateList.map(item=>{
// _plate+=item.plate+','
// })
this.plateList.map(item=>{
_plate.push(item.plate)
})
}
this.form.plate = _plate
console.log("plate",this.form)
this.form.plate = _plate.join(',')
console.log("plate",this.form)
// return
this.$u.api.scheduleSave({
...this.form,
start_time:start_time,
end_time:end_time
}).then(res => {
this.base.toast("预约成功",2000,function(){
uni.redirectTo({
url:'/packages/mybook/index'
})
})
this.newsSubscription()
})
} else {
@ -321,7 +319,81 @@
// this.base.toast("")
}
});
}
},
//
newsSubscription() {
let that = this
uni.getSetting({
withSubscriptions: true, //false
success(res) {
console.log("resdfg", res)
if (res.subscriptionsSetting.mainSwitch) {
if (res.subscriptionsSetting.itemSettings && res.subscriptionsSetting.itemSettings[
'0WMaFZ_0FOS5gtxEAi-fM3pFcYPySRMwYFNASz9oig0'] === 'accept') {
//
that.base.toast("预约成功",2000,function(){
setTimeout(function(){
uni.redirectTo({
url:'/packages/mybook/index'
})
},2000)
})
} else {
//
uni.showModal({
title: '订阅消息',
content: '是否需要订阅预约结果消息',
success(res1) {
if (res1.confirm) {
uni.requestSubscribeMessage({
tmplIds: [
'0WMaFZ_0FOS5gtxEAi-fM3pFcYPySRMwYFNASz9oig0',
],
success(res) {
that.base.toast("预约成功",2000,function(){
setTimeout(function(){
uni.redirectTo({
url:'/packages/mybook/index'
})
},2000)
})
},
fail(err) {
that.base.toast("预约成功",2000,function(){
setTimeout(function(){
uni.redirectTo({
url:'/packages/mybook/index'
})
},2000)
})
}
})
} else {
that.base.toast("预约成功",2000,function(){
setTimeout(function(){
uni.redirectTo({
url:'/packages/mybook/index'
})
},2000)
})
}
}
})
}
} else {
that.base.toast("预约成功",2000,function(){
setTimeout(function(){
uni.redirectTo({
url:'/packages/mybook/index'
})
},2000)
})
//
}
}
});
},
}
}
</script>

@ -19,31 +19,13 @@
</view>
</block>
</view>
<view class="detail-btn">
<view class="detail-btn" v-if="info.status===1&&info.course_status===30">
<view @click="toApply">
<image class="course-btn" :src="base.imgHost('course-btn.png')"></image>
<text>我要报名</text>
</view>
</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">绑定</u-button>
<u-button type="primary" @click="toApply"></u-button>
</view>
</u-popup>
</view>
<tabbar :currentPage="1"></tabbar>
<view class="modal">
<u-popup v-model="showRegister" mode="bottom">
@ -77,7 +59,6 @@
},
data() {
return {
showRegister: false,
hasMobile: false,
course_id: '',
info: {},
@ -301,27 +282,47 @@
}
}
.modal {
&-tip {
text-align: center;
padding: 30rpx;
font-size: 28rpx;
}
&-content {
height: 300rpx;
padding: 0 30rpx;
}
&-btn {
display: flex;
justify-content: space-between;
padding: 30rpx;
u-button {
width: 45%;
}
}
.modal {
::v-deep .u-drawer-bottom {
border-radius: 40rpx;
}
&-tip {
text-align: center;
padding: 30rpx;
font-size: 32rpx;
}
&-content {
height: 450rpx;
padding: 0 30rpx;
font-size: 32rpx;
text-align: center;
&>view {
margin: 30rpx auto;
}
}
&-bind {
width: 45%;
text-align: center;
margin: 0 auto;
color: #fff;
border-radius: 30rpx;
padding: 20rpx;
background: linear-gradient(to right, #e4cdb4, #c69c6d);
}
&-register {
width: 45%;
text-align: center;
margin: 0 auto;
color: #fff;
border-radius: 30rpx;
padding: 20rpx;
background: linear-gradient(to right, #5e5fbc, #0d0398);
}
}
}
</style>

@ -2,7 +2,7 @@
<view class="container">
<image class="cbg" :src="base.imgHost('common_bg.png')"></image>
<view class="wrap">
<u-form :model="form" :label-width="140" ref="uForm" :label-align="'left'" error-type="toast">
<u-form :model="form" :label-width="140" ref="uForm" :label-align="'left'" :error-type="['message']">
<u-form-item label="姓名" prop="username">
{{form.username}}
</u-form-item>
@ -33,6 +33,7 @@
<view v-if="plateList.length>0">
<view v-for="item in plateList">
{{item}}
<u-icon color="red" style="margin-left:20rpx" @click="delPlate(index)" name="close"></u-icon>
</view>
</view>
<u-button size="mini" type="primary" v-if="plateList.length<2" @click="addPlate"></u-button>
@ -54,7 +55,6 @@
<view class="modal-content" style="height:400rpx">
<view>
<plate @listenPlateChange="plateChange" :defaultPlate="plateNumber" />
</view>
</view>
<view class="form-btn">
@ -78,7 +78,9 @@
return {
showPosition: false,
positionList: [],
form: {},
form: {
},
plateList: [],
showPark: false,
plate1: '',
@ -134,7 +136,8 @@
getUserInfo() {
this.$u.api.user().then(res => {
console.log("res", res)
this.form = this.base.requestToForm(res.user, this.form)
// this.form = this.base.requestToForm(res.user, this.form)
this.form = this.base.deepCopy(res.user)
if (res.user.plate) {
this.plateList = res.user.plate.split(',')
this.plateList.map((item, index) => {
@ -153,6 +156,10 @@
}
// this.plateList.push('')
this.showPark = true
},
delPlate(index){
this.plateList.splice(index,1)
this.saveUser('del')
},
changeMobile() {
@ -162,9 +169,21 @@
},
saveUser(type) {
if (type == 'add') {
if (type == 'add') {
console.log("this.plate1",this.plate1)
if(this.plate1.length<7){
this.base.toast("车牌号不正确")
return
}
if(this.plateList.indexOf(this.plate1)!==-1){
this.base.toast("车牌号不能重复")
return
}
this.plateList.push(this.plate1)
this.form.plate = this.plateList.join(",")
}
if(type=='del'){
this.form.plate = this.plateList.join(",")
}
console.log("plateList", this.plateList)
let that = this
@ -172,14 +191,25 @@
if (valid) {
this.$u.api.saveUser(this.form).then(res => {
this.showPark = false
this.plate1 = ''
this.base.toast("更新用户信息成功", 2000, function() {
if (type === 'add') {
this.plate1 = ''
let toastTitle = "更新用户信息成功"
if(type==='add'){
toastTitle = "新增车牌成功"
}else if(type==='del'){
toastTitle = "删除车牌成功"
}else{
toastTitle = "更新用户信息成功"
}
this.base.toast(toastTitle, 2000, function() {
if (type === 'add' || type==='del') {
that.getUserInfo()
} else {
uni.switchTab({
url: '/pages/me/index'
})
} else {
setTimeout(function(){
uni.switchTab({
url: '/pages/me/index'
})
},2000)
}
})

@ -1,165 +1,237 @@
<template>
<view class="container">
<image class="cbg" :src="base.imgHost('common_bg.png')"></image>
<view class="wrap">
<view>{{courseInfo.name}}</view>
<view v-if="info.fee_status==1">
您已缴费成功
</view>
<view v-else-if="info.fee_status==2">
您上传的缴费图片有误请重新上传
</view>
<view v-else-if="info.fee_status==3">
您已上传成功请等待确认
</view>
<view v-if="info.fee_status!=1">
上传缴费图片
<u-button type="primary" size="mini" @click="uploadFile"></u-button>
<!-- <u-upload :header='header'
@on-success="uploadSuccess"
:action="action" :file-list="fileList" max-count="1"></u-upload> -->
</view>
<view v-if="hasFeeFiles" style="width:100%;">
<image mode="widthFix" style="width:80%;margin:0 auto;display: block;" :src="info.fee_files[0].url"></image>
</view>
</view>
<view class="modal">
<u-popup v-model="showPark" mode="bottom">
<view class="modal-tip">绑定车牌号</view>
<view class="modal-content">
<view>
车牌1<u-input type="idcard" v-model="plate1" />
</view>
<view>
车牌2<u-input type="idcard" v-model="plate2" />
</view>
</view>
<view class="modal-btn">
<u-button type="primary" @click="updatePlate"></u-button>
</view>
</u-popup>
<view class="wrap">
<view>{{courseInfo.name}}</view>
<view v-if="info.fee_status==1">
您已缴费成功
</view>
<view v-else-if="info.fee_status==2">
您上传的缴费图片有误请重新上传
</view>
<view v-else-if="info.fee_status==3">
您已上传成功请等待确认
</view>
<view v-if="info.fee_status!=1">
上传缴费图片
<u-button type="primary" size="mini" @click="uploadFile()"></u-button>
<!-- <u-upload :header='header'
@on-success="uploadSuccess"
:action="action" :file-list="fileList" max-count="1"></u-upload> -->
</view>
<view v-if="hasFeeFiles" style="width:100%;">
<image mode="widthFix" style="width:80%;margin:0 auto;display: block;" :src="info.fee_files[0].url">
</image>
</view>
</view>
<view class="modal">
<u-popup v-model="showPark" mode="bottom">
<view class="modal-tip">绑定车牌号</view>
<view class="modal-content">
<view>
车牌1<u-input type="text" placeholder="请输入车牌" v-model="plate1" />
</view>
<view>
车牌2<u-input type="text" placeholder="请输入车牌" v-model="plate2" />
</view>
</view>
<view class="modal-btn">
<u-button type="primary" @click="updatePlate"></u-button>
</view>
</u-popup>
</view>
</view>
</template>
<script>
import {
ROOTPATH as baseUrl
<script>
import {
ROOTPATH as baseUrl
} from "@/common/config.js"
export default {
components: {
},
components: {},
data() {
return {
hasFeeFiles:false,
course_id:'',
info:{},
userInfo:{},
courseInfo:{},
header:{},
action:`${baseUrl}/api/mobile/upload-file`,
fileList:{},
showPark:false,
plate1:'',
plate2:''
return {
hasFeeFiles: false,
course_id: '',
info: {},
userInfo: {},
courseInfo: {},
header: {},
action: `${baseUrl}/api/mobile/upload-file`,
fileList: {},
showPark: false,
plate1: '',
plate2: ''
}
},
onLoad(options) {
this.course_id = options.id
let token = uni.getStorageSync('stbc_lifeData') ? uni.getStorageSync('stbc_lifeData').vuex_token : ''
this.header.Authorization = `Bearer ${token}`
onLoad(options) {
this.course_id = options.id
let token = uni.getStorageSync('stbc_lifeData') ? uni.getStorageSync('stbc_lifeData').vuex_token : ''
this.header.Authorization = `Bearer ${token}`
this.getCourseDetail(options.id)
},
methods:{
async getCourseDetail(id) {
const res = await this.$u.api.courseGetSign({
course_id: id
})
this.info = res.detail
this.userInfo = res.detail.user
this.courseInfo = res.detail.course
if(res.detail.fee_files.length>0){
this.hasFeeFiles = true
}else{
this.hasFeeFiles = false
}
},
uploadFile(){
uni.chooseImage({
success: (chooseImageRes) => {
console.log("chooseImageRes",chooseImageRes)
const tempFilePaths = chooseImageRes.tempFilePaths;
if(chooseImageRes.tempFilePaths && chooseImageRes.tempFilePaths.length>1){
this.base.toast("缴费图片只能上传1张")
return
}
uni.uploadFile({
url: this.action, //
filePath: tempFilePaths[0],
fileType:'image',
name: 'file',
header:this.header,
success: (uploadFileRes) => {
console.log(uploadFileRes.data);
this.fileList = {}
this.fileList = JSON.parse(uploadFileRes.data)
console.log("this.fileList ",this.fileList )
this.updateSign()
},
fail(err){
console.log("err",err)
this.base.toast("上传失败")
},
});
}
});
},
updateSign(){
},
methods: {
async getCourseDetail(id) {
const res = await this.$u.api.courseGetSign({
course_id: id
})
this.info = res.detail
this.userInfo = res.detail.user
this.courseInfo = res.detail.course
if (res.detail.fee_files.length > 0) {
this.hasFeeFiles = true
} else {
this.hasFeeFiles = false
}
},
uploadFile() {
uni.chooseImage({
success: (chooseImageRes) => {
console.log("chooseImageRes", chooseImageRes)
const tempFilePaths = chooseImageRes.tempFilePaths;
if (chooseImageRes.tempFilePaths && chooseImageRes.tempFilePaths.length > 1) {
this.base.toast("缴费图片只能上传1张")
return
}
uni.uploadFile({
url: this.action,
filePath: tempFilePaths[0],
fileType: 'image',
name: 'file',
header: this.header,
success: (uploadFileRes) => {
this.fileList = {}
this.fileList = JSON.parse(uploadFileRes.data)
this.updateSign()
},
fail(err) {
console.log("err", err)
this.base.toast("上传失败")
},
});
}
});
},
updateSign() {
let files_id = [this.fileList.id]
this.$u.api.courseUpdateSign({
id:this.info.id,
fee_file_ids:files_id,
fee_status:3
}).then(res=>{
this.base.toast("上传成功")
this.getCourseDetail(this.course_id)
//
if(this.hasFeeFiles){
}else{
//
if(this.base.isNull(this.userInfo.plate)){
this.showPark = true
}
}
})
},
updatePlate(){
if(this.base.isNull(this.plate1) && this.base.isNull(this.plate2)){
this.base.toast('请输入至少一个车牌')
return
}
this.$u.api.saveUser({
id:this.userInfo.id,
plate:this.plate1+','+this.plate2
}).then(res=>{
this.base.toast("绑定车牌成功")
this.$u.api.user().then(res => {
this.$u.vuex('vuex_user', res.user)
this.showPark = false
})
})
}
let that = this
this.$u.api.courseUpdateSign({
id: this.info.id,
fee_file_ids: files_id,
fee_status: 3
}).then(res => {
that.base.toast("上传成功", 1500, function() {
setTimeout(function() {
that.newsSubscription()
}, 500)
})
})
},
updatePlate() {
if (this.base.isNull(this.plate1) && this.base.isNull(this.plate2)) {
this.base.toast('请输入至少一个车牌')
return
}
this.$u.api.saveUser({
id: this.userInfo.id,
plate: this.plate1 + ',' + this.plate2
}).then(res => {
this.base.toast("绑定车牌成功")
this.$u.api.user().then(res => {
this.$u.vuex('vuex_user', res.user)
this.showPark = false
})
})
},
//
newsSubscription() {
let that = this
uni.getSetting({
withSubscriptions: true, //false
success(res) {
console.log("resdfg", res)
if (res.subscriptionsSetting.mainSwitch) {
if (res.subscriptionsSetting.itemSettings && res.subscriptionsSetting.itemSettings[
'CCEUrg9t8aW40NEDoqEk7NY7pyllW_0GEHfjwg_DF6A'] === 'accept') {
//
if (!that.hasFeeFiles) {
//
if (that.base.isNull(that.userInfo.plate)) {
that.showPark = true
}
}
that.getCourseDetail(that.course_id)
} else {
//
uni.showModal({
title: '订阅消息',
content: '是否需要订阅缴费结果消息',
success(res1) {
if (res1.confirm) {
uni.requestSubscribeMessage({
tmplIds: [
'CCEUrg9t8aW40NEDoqEk7NY7pyllW_0GEHfjwg_DF6A',
],
success(res) {
that.base.toast("订阅成功", 1500, function() {
//
if (!that.hasFeeFiles) {
//
if (that.base.isNull(that
.userInfo.plate)) {
that.showPark = true
}
}
that.getCourseDetail(that
.course_id)
})
},
fail(err) {
//
if (!that.hasFeeFiles) {
//
if (that.base.isNull(that.userInfo
.plate)) {
that.showPark = true
}
}
that.getCourseDetail(that.course_id)
}
})
} else {
if (!that.hasFeeFiles) {
//
if (that.base.isNull(that.userInfo.plate)) {
that.showPark = true
}
}
that.getCourseDetail(that.course_id)
}
}
})
}
} else {
if (!that.hasFeeFiles) {
//
if (that.base.isNull(that.userInfo.plate)) {
that.showPark = true
}
}
that.getCourseDetail(that.course_id)
//
}
}
});
},
}
}
@ -171,6 +243,7 @@
width: 100%;
height: 100vh;
overflow: scroll;
.cbg {
position: absolute;
top: 0;
@ -181,8 +254,32 @@
.wrap {
position: relative;
&>view{
margin:20rpx 0;
&>view {
margin: 20rpx 0;
}
}
.modal {
&-tip {
text-align: center;
padding: 30rpx;
font-size: 28rpx;
}
&-content {
height: 300rpx;
padding: 0 30rpx;
}
&-btn {
display: flex;
justify-content: center;
padding: 30rpx;
u-button {
width: 45%;
}
}
}
}

@ -1,15 +1,16 @@
<template>
<view class="container">
<image class="cbg" :src="base.imgHost('common_bg.png')"></image>
<view class="search">
<view class="search">
<view class="search-icon" @click="showSearch=!showSearch">
<image :src="base.imgHost('search.png')"></image>
</view>
<view class="search-tab">
<u-tabs :bg-color="'#f0f7fc'" active-color="#b89155" :list="selectArr.company_industry" name="value"
:is-scroll="true" :current="current" @change="changeSearch"></u-tabs>
</view>
<view class="search-icon" @click="showSearch=!showSearch">
<image :src="base.imgHost('search.png')"></image>
</view>
</view>
<view class="wrap">
@ -50,11 +51,11 @@
<text>公司名称</text>
<u-input v-model="select.company_name" border placeholder="请输入公司名称"></u-input>
</view>
<view>
<!-- <view>
<text>职务</text>
<u-input v-model="select.company_position" type="select" @click="showPosition=true" border
placeholder="请选择"></u-input>
</view>
</view> -->
<view>
<text>企业性质</text>
<u-input v-model="select.company_type" type="select" @click="showType=true" border
@ -77,8 +78,8 @@
</view>
</view>
<u-picker @confirm="selectPosition" v-model="showPosition" :range="selectArr.company_position" range-key="value"
mode="selector"></u-picker>
<!-- <u-picker @confirm="selectPosition" v-model="showPosition" :range="selectArr.company_position" range-key="value"
mode="selector"></u-picker> -->
<u-picker @confirm="selectArea" v-model="showArea" :range="selectArr.company_area" range-key="value"
mode="selector"></u-picker>
<u-picker @confirm="selectType" v-model="showType" :range="selectArr.company_type" range-key="value"
@ -104,7 +105,7 @@
showType: false,
showIndustry: false,
selectArr: {
company_position: [],
// company_position: [],
company_area: [],
company_type: [],
company_industry: [{
@ -114,7 +115,7 @@
select: {
name: '',
company_name: '',
company_position: '',
// company_position: '',
company_area: '',
company_type: '',
company_industry: '',
@ -141,7 +142,7 @@
// course_id: id,
name: this.select.name,
company_name: this.select.company_name,
company_position: this.select.company_position,
// company_position: this.select.company_position,
company_area: this.select.company_area,
company_type: this.select.company_type,
company_industry: this.select.company_industry,
@ -163,7 +164,7 @@
getIndustry() {
this.$u.api.getparameter({
'number[0]': 'company_industry',
'number[1]': 'company_position',
// 'number[1]': 'company_position',
'number[2]': 'company_area',
'number[3]': 'company_type',
}).then(res => {
@ -189,9 +190,9 @@
}
this.getMyCourseTxl()
},
selectPosition(e) {
this.select.company_position = this.selectArr.company_position[e[0]]['value']
},
// selectPosition(e) {
// this.select.company_position = this.selectArr.company_position[e[0]]['value']
// },
selectArea(e) {
this.select.company_area = this.selectArr.company_area[e[0]]['value']
},
@ -205,7 +206,7 @@
this.select = {
name: '',
company_name: '',
company_position: '',
// company_position: '',
company_area: '',
company_type: '',
company_industry: '',

@ -12,15 +12,16 @@
}
},
onLoad(options) {
// http://szsatbc2024.115.langye.net
if(options.type==1){
//
this.link = 'https://szsatbc2024.mc002.langye.net/about/aboutinfo/?from=wx'
this.link = 'https://szsatbc2024.115.langye.net/about/aboutinfo/?from=wx'
}else if(options.type==2){
//
this.link = `https://szsatbc2024.mc002.langye.net/news/?from=wx`
this.link = `https://szsatbc2024.115.langye.net/news/?from=wx`
}else if(options.type==3){
//
this.link = `https://szsatbc2024.mc002.langye.net${options.url}?from=wx`
this.link = `https://szsatbc2024.115.langye.net${options.url}?from=wx`
}
},
methods:{

@ -10,7 +10,7 @@
<block v-for="(item,index) in siteList">
<view class="book-pic-item" v-if="item.files.length>0">
<block>
<swiper circular indicator-dots
<swiper circular :indicator-dots="item.files.length>1?true:false"
indicator-active-color="#b79373"
indicator-color="#fff"
style="height:350rpx" :autoplay="false" >
@ -56,10 +56,16 @@
}
},
onShareAppMessage() {
return this.base.shareInfo
return{
title:"苏州科技商学院",
imageUrl:"/static/share.jpg"
}
},
onShareTimeline() {
return this.base.shareInfo
return{
title:"苏州科技商学院",
imageUrl:"/static/share.jpg"
}
},
onShow() {
this.getUser()

@ -11,9 +11,9 @@
<view class="list-item-wrap">
<view class="list-item-wrap-time">
<view v-if="!item.sign_start_date || item.sign_date_status==='待定'">
<view class="bigFont" style="border-bottom: none;">
<view class="bigFont" style="border-bottom: none;font-size: 36rpx;">
{{convertToChineseMonth(item.sign_start_date,item.sign_date_status).month}}</view>
<view class="bigFont" style="border-bottom: none;">
<view class="bigFont" style="border-bottom: none;font-size: 36rpx;">
{{convertToChineseMonth(item.sign_start_date,item.sign_date_status).year}}</view>
</view>
<view v-else>
@ -98,10 +98,16 @@
}
},
onShareAppMessage() {
return this.base.shareInfo
return{
title:"苏州科技商学院",
imageUrl:"/static/share.jpg"
}
},
onShareTimeline() {
return this.base.shareInfo
return{
title:"苏州科技商学院",
imageUrl:"/static/share.jpg"
}
},
onLoad() {
this.getBannerList()
@ -140,20 +146,19 @@
const res = await this.$u.api.courseIndex({
page: this.current_page,
page_size: 10,
// status:1
status:1
})
this.total_page = res.last_page
if (res.data.length === 0 && this.current_page === 1) {
this.hasData = false
}
this.course_list.push(...res.data)
},
convertToChineseMonth(dateString, dateStatus) {
if (this.base.isNull(dateString) || dateStatus === '待定') {
return {
month: '',
year: ""
month: '预告',
year: "课程"
}
} else {
//

@ -1,19 +1,17 @@
<template>
<view class="container">
<!-- #ifdef MP-WEIXIN -->
<privacy-popup ref="privacyComponent" @agree-privacy="onAgreePrivacy"
@reject-privacy="onRejectPrivacy"></privacy-popup>
<!-- #endif -->
<view class="container">
<view class="container-top">
<u-navbar :is-back="false" :is-fixed="false" :height="topNavHeight" :background="topbg" title-color="#fff"
title-size="32" :border-bottom="false" title="苏州科技商学院"></u-navbar>
<view v-if="showWx" class="container-wx">
<u-icon name="close" color="#fff" @click="showWx=false"></u-icon>
<view>
点击<text></text><text class="container-wx-big"></text><text></text>添加到我的小程序下次访问更快捷
</view>
<view style="height:60rpx;margin-top:20rpx;">
<view v-if="showWx" class="container-wx">
<u-icon name="close" color="#fff" @click="showWx=false"></u-icon>
<view>
点击<text></text><text class="container-wx-big"></text><text></text>添加到我的小程序下次访问更快捷
</view>
</view>
</view>
<topBanner :banner_list="banner_list"></topBanner>
</view>
<view class="container-content">
@ -84,10 +82,16 @@
}
},
onShareAppMessage() {
return this.base.shareInfo
return{
title:"苏州科技商学院",
imageUrl:"/static/share.jpg"
}
},
onShareTimeline() {
return this.base.shareInfo
return{
title:"苏州科技商学院",
imageUrl:"/static/share.jpg"
}
},
onLoad() {
let menuButtonObject = uni.getMenuButtonBoundingClientRect();
@ -220,8 +224,9 @@
font-size: 24rpx;
width: 100%;
background-color: #271f8e;
padding: 15rpx 0;
margin-top: 20rpx;
padding: 15rpx 0;
height:60rpx;
// margin-top: 20rpx;
::v-deep .u-icon {
margin: 0 30rpx;

@ -125,10 +125,16 @@
}
},
onShareAppMessage() {
return this.base.shareInfo
return{
title:"苏州科技商学院",
imageUrl:"/static/share.jpg"
}
},
onShareTimeline() {
return this.base.shareInfo
return{
title:"苏州科技商学院",
imageUrl:"/static/share.jpg"
}
},
onShow() {
this.showRegister = false
@ -309,41 +315,6 @@
padding: 20rpx;
background: linear-gradient(to right, #5e5fbc, #0d0398);
}
&-btn {
display: flex;
justify-content: space-between;
padding: 30rpx;
&>view {
width: 45%;
text-align: center;
margin: 0 auto;
color: #fff;
border-radius: 30rpx;
padding: 20rpx;
}
&-bind {
width: 45%;
text-align: center;
margin: 0 auto;
color: #fff;
border-radius: 30rpx;
padding: 20rpx;
background: linear-gradient(to right, #e4cdb4, #c69c6d);
}
&-register {
width: 45%;
text-align: center;
margin: 0 auto;
color: #fff;
border-radius: 30rpx;
padding: 20rpx;
background: linear-gradient(to right, #5e5fbc, #0d0398);
}
}
}
.modal-wrap {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 135 KiB

Loading…
Cancel
Save