diff --git a/common/http.api.js b/common/http.api.js
index a10d1ce..1a05701 100644
--- a/common/http.api.js
+++ b/common/http.api.js
@@ -25,7 +25,8 @@ let apiApp = {
// 预约
scheduleIndex: '/api/mobile/schedule/index',
scheduleSave: '/api/mobile/schedule/save',
- scheduleDetail: '/api/mobile/schedule/detail',
+ scheduleDetail: '/api/mobile/schedule/detail',
+ scheduleCheck:'/api/mobile/schedule/check',
// 其他
otherConfig: '/api/mobile/other/config',
otherBanner: '/api/mobile/other/banner',
@@ -63,7 +64,8 @@ const install = (Vue, vm) => {
// 预约
let scheduleIndex = (params = {}) => vm.$u.get(apiApp.scheduleIndex, params);
let scheduleSave = (params = {}) => vm.$u.post(apiApp.scheduleSave, params);
- let scheduleDetail = (params = {}) => vm.$u.get(apiApp.scheduleDetail, params);
+ let scheduleDetail = (params = {}) => vm.$u.get(apiApp.scheduleDetail, params);
+ let scheduleCheck = (params = {}) => vm.$u.get(apiApp.scheduleCheck, params);
// 其他
let otherConfig = (params = {}) => vm.$u.get(apiApp.otherConfig, params);
@@ -106,6 +108,7 @@ const install = (Vue, vm) => {
scheduleIndex,
scheduleSave,
scheduleDetail,
+ scheduleCheck,
// 资讯
courseNews,
// 其他
diff --git a/common/http.interceptor.js b/common/http.interceptor.js
index f3d3a6b..846286b 100644
--- a/common/http.interceptor.js
+++ b/common/http.interceptor.js
@@ -23,8 +23,8 @@ const install = (Vue, vm) => {
// 请求拦截部分,如配置,每次请求前都会执行
Vue.prototype.$u.http.interceptor.request = (config) => {
console.log('config-http', config)
- let stbc_lifeData = uni.getStorageSync('stbc_lifeData')
- let vuex_token = stbc_lifeData.vuex_token;
+ let stbc1_lifeData = uni.getStorageSync('stbc1_lifeData')
+ let vuex_token = stbc1_lifeData.vuex_token;
if (vuex_token || vm.vuex_token) {
config.header['Authorization'] = `Bearer ${vuex_token || vm.vuex_token}`;
}
@@ -43,7 +43,7 @@ const install = (Vue, vm) => {
confirmText: '重新获取',
success: function(res) {
if (res.confirm) {
- uni.removeStorageSync('stbc_lifeData')
+ uni.removeStorageSync('stbc1_lifeData')
uni.login({
provider: 'weixin',
success: (res) => {
@@ -56,7 +56,7 @@ const install = (Vue, vm) => {
},
method: 'GET',
success: result => {
- uni.setStorageSync("stbc_lifeData", {'vuex_token': result.data.token})
+ uni.setStorageSync("stbc1_lifeData", {'vuex_token': result.data.token})
uni.request({
url: baseUrl + "/api/mobile/user/get-user-info",
header:{
@@ -66,7 +66,7 @@ const install = (Vue, vm) => {
},
method: 'GET',
success: result1 => {
- uni.setStorageSync("stbc_lifeData", {
+ uni.setStorageSync("stbc1_lifeData", {
'vuex_token': result.data.token,
"vuex_user" : result1.data.user
})
diff --git a/components/applyForm/index.vue b/components/applyForm/index.vue
index 61738de..63f29d6 100644
--- a/components/applyForm/index.vue
+++ b/components/applyForm/index.vue
@@ -103,7 +103,7 @@
},
onReady() {
// this.$refs.uForm.setRules(this.rules);
- let token = uni.getStorageSync("stbc_lifeData").vuex_token
+ let token = uni.getStorageSync("stbc1_lifeData").vuex_token
console.log("token", token)
this.formData = {
token: token
diff --git a/components/next-indexed-xlist/components/next-indexed-xlist/next-indexed-xlist.vue b/components/next-indexed-xlist/components/next-indexed-xlist/next-indexed-xlist.vue
index 4d61423..a7fa71d 100644
--- a/components/next-indexed-xlist/components/next-indexed-xlist/next-indexed-xlist.vue
+++ b/components/next-indexed-xlist/components/next-indexed-xlist/next-indexed-xlist.vue
@@ -4,6 +4,9 @@
+
+
+ 按照姓名首字母顺序排列,排名不分先后
@@ -23,15 +26,24 @@
-
- {{mess.name}}
- 【{{mess.course_signs[0]['course'].name}}】
-
-
- {{mess[phoneKey]}}
- {{mess['company_name']||''}}
- {{mess['company_position']||''}}
+
+
+ {{mess.name}}
+
+
+
+
+
+
+
+ {{mess['company_name']||''}}
+
+ 如需联系方式请联系班主任
@@ -102,17 +102,17 @@
message: '手机号码不正确',
trigger: ['blur'],
}],
- idcard: [{
- required: true,
- message: '请输入身份证号',
- trigger: ['blur'],
- }, {
- validator: (rule, value, callback) => {
- return this.$u.test.idCard(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: '请输入邮箱',
@@ -133,7 +133,7 @@
onLoad(options) {
this.course_id = options.id
this.getCourseDetail(options.id)
- let user = uni.getStorageSync("stbc_lifeData") ? uni.getStorageSync("stbc_lifeData").vuex_user : {}
+ let user = uni.getStorageSync("stbc1_lifeData") ? uni.getStorageSync("stbc1_lifeData").vuex_user : {}
this.form = user
this.getPosition()
},
diff --git a/packages/booksubmit/appointment.vue b/packages/booksubmit/appointment.vue
new file mode 100644
index 0000000..972c43f
--- /dev/null
+++ b/packages/booksubmit/appointment.vue
@@ -0,0 +1,306 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+ 预约
+
+
+ {{item.introduce}}
+
+
+
+ 位
+ 置:
+
+ {{item.floor}}
+
+
+
+
+
+ 时
+ 间:
+
+ {{item.start_time}}-{{item.end_time}}
+
+
+
+
+ 容纳
+ 人数:
+
+ {{item.total}}
+
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+ 预约
+
+
+ {{item.introduce}}
+
+
+
+ 位
+ 置:
+
+ {{item.floor}}
+
+
+
+
+ 时
+ 间:
+
+ {{item.start_time}}-{{item.end_time}}
+
+
+
+
+ 容纳人数:
+
+ {{item.total}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/booksubmit/index.vue b/packages/booksubmit/index.vue
index a79d8d3..ff7198b 100644
--- a/packages/booksubmit/index.vue
+++ b/packages/booksubmit/index.vue
@@ -16,6 +16,10 @@
+
+
+
+
新增
@@ -62,7 +66,7 @@
车牌号
- {plateChange(val,index)}" :defaultPlate="plateNumber" />
+ {plateChange(val,index)}" :defaultPlate="plateNumber" />
确认
@@ -104,7 +108,8 @@
return {
dateShow: false,
hMin:0,
- hMax:24,
+ hMax:24,
+ appoinementType:'',
dateParams: {
year: true,
month: true,
@@ -148,6 +153,17 @@
required: true,
message: '请输入预约事项',
trigger: ['change', 'blur'],
+ }],
+ idcard: [{
+ required: true,
+ message: '请输入身份证号',
+ trigger: ['blur'],
+ }, {
+ validator: (rule, value, callback) => {
+ return this.$u.test.idCard(value);
+ },
+ message: '身份证号不正确',
+ trigger: ['blur'],
}],
timeRange: [{
required: true,
@@ -158,7 +174,8 @@
required: true,
message: '请选择预约场地',
trigger: ['change', 'blur'],
- }]
+ }],
+
},
@@ -167,10 +184,19 @@
onReady() {
this.$refs.uForm.setRules(this.rules);
},
- onLoad() {
+ onLoad(options) {
+ this.appoinementType = options.type?options.type:''
+ this.getUser()
this.getSites()
},
- methods: {
+ methods: {
+ getUser() {
+ this.$u.api.user().then(res => {
+ console.log("res", res)
+ this.form.idcard = res.user.idcard
+ this.$u.vuex('vuex_user', res.user)
+ })
+ },
// 日期
dateConfirm(e) {
console.log("date", e)
@@ -193,8 +219,15 @@
},
// 场地
getSites() {
- this.$u.api.otherConfig().then(res => {
- this.siteList = res.appointment.filter(item=>item.status===1)
+ this.$u.api.otherConfig({
+ appointment_type_id:this.appoinementType
+ }).then(res => {
+ this.siteList = res.appointment.filter(item=>item.status===1)
+ if(this.siteList.length===0){
+ this.base.toast("当前没有场地可以预约")
+ }else{
+ this.siteList = this.siteList.sort((a, b) => a['sort'] - b['sort']);
+ }
})
},
siteConfirm(e) {
@@ -236,9 +269,23 @@
this.plateList.splice(index,1)
},
confirmPlate(){
+
+ console.log("this.plateList[this.plateIndex]",this.plateList[this.plateIndex])
+ console.log(this.plateList[this.plateIndex]['plate'])
+ console.log(this.plateList[this.plateIndex]['plate'].length<7)
+ if(!this.plateList[this.plateIndex]){
+ this.base.toast("请输入车牌号")
+ return
+ }
+ if(this.base.isNull(this.plateList[this.plateIndex]['plate'])
+ || this.plateList[this.plateIndex]['plate'].length<7){
+ this.base.toast("请输入正确的车牌号")
+ return
+ }
this.showPlate=false
this.plateList[this.plateIndex]['show'] = true
this.plateIndex= -1
+ this.$refs.plates.panelReset()
this.plateNumber = ['苏', 'E', '', '', '', '', '']
},
// 同行人
@@ -286,7 +333,12 @@
},
submit() {
let start_time = ''
- let end_time = ''
+ let end_time = ''
+ // this.$u.api.scheduleCheck({
+ // site:this.siteList[e[0]].id
+ // }).then(res=>{
+ // console.log("res",res)
+ // })
this.$refs.uForm.validate(valid => {
if (valid) {
start_time = this.form.date + ' ' + this.form.start_time + ':00'
diff --git a/packages/course/detail.vue b/packages/course/detail.vue
index e684dd7..4612a47 100644
--- a/packages/course/detail.vue
+++ b/packages/course/detail.vue
@@ -1,31 +1,35 @@
-
- {{info.name}}
-
-
- 开课日期:{{info.start_date}} 至 {{info.end_date}}
+
+
+
+
+
+
+
+
+
+
+
+
+ 课程详情敬请期待...
+
+
-
-
-
-
-
-
-
-
- 课程详情敬请期待...
+
+
+
+ 我要报名
-
-
-
-
-
- 我要报名
+
@@ -63,7 +67,8 @@
course_id: '',
info: {},
imgList: [],
- showRegister: false
+ showRegister: false,
+ hasImg: false,
}
},
@@ -73,21 +78,21 @@
title: this.info.name,
imageUrl: '/static/share.jpg'
}
- },
- onShareTimeline() {
- return {
- path: "/packages/course/detail?id=" + this.course_id, //这是为了传参 onload(data){let id=data.id;}
- title: this.info.name,
- imageUrl: '/static/share.jpg'
- }
+ },
+ onShareTimeline() {
+ return {
+ path: "/packages/course/detail?id=" + this.course_id, //这是为了传参 onload(data){let id=data.id;}
+ title: this.info.name,
+ imageUrl: '/static/share.jpg'
+ }
},
onLoad(options) {
this.course_id = options.id
- let token = uni.getStorageSync('stbc_lifeData') ? uni.getStorageSync('stbc_lifeData').vuex_token : ''
+ let token = uni.getStorageSync('stbc1_lifeData') ? uni.getStorageSync('stbc1_lifeData').vuex_token : ''
if (this.base.isNull(token)) {
this.getToken()
} else {
- let user = uni.getStorageSync("stbc_lifeData") ? uni.getStorageSync("stbc_lifeData").vuex_user : {}
+ let user = uni.getStorageSync("stbc1_lifeData") ? uni.getStorageSync("stbc1_lifeData").vuex_user : {}
if (!this.base.isNull(user.mobile)) {
this.hasMobile = true
} else {
@@ -96,6 +101,9 @@
this.getCourseDetail(this.course_id)
}
},
+ onHide() {
+ this.showRegister = false
+ },
methods: {
async getToken() {
let that = this
@@ -105,7 +113,7 @@
this.$u.api.login({
code: res.code
}).then(res1 => {
- uni.setStorageSync("stbc_lifeData", {
+ uni.setStorageSync("stbc1_lifeData", {
'vuex_token': res1.token
})
uni.request({
@@ -115,7 +123,7 @@
},
method: "GET",
success(res2) {
- uni.setStorageSync("stbc_lifeData", {
+ uni.setStorageSync("stbc1_lifeData", {
'vuex_token': res1.token,
"vuex_user": res2.data.user
})
@@ -140,7 +148,6 @@
});
},
async getCourseDetail(id) {
-
const res = await this.$u.api.courseDetail({
course_id: id
})
@@ -148,13 +155,34 @@
if (res.publicize && res.publicize.length > 0) {
this.imgList = res.publicize
}
+ this.hasImg = true
+ uni.setNavigationBarTitle({
+ title: res.name,
+ success: function() {
+ console.log('标题设置成功');
+ },
+ fail: function(err) {
+ console.error('标题设置失败', err);
+ }
+ });
},
// 是否有手机号,有则是学员, 没有就是游客。
// 游客可以选择绑定 或 注册报名
// 报名
toApply() {
+ // 我已报名该课程
+ let that = this
+ if (this.info.my_user) {
+ this.base.toast("您已报名该课程", 2000, function() {
+ setTimeout(function() {
+ uni.navigateTo({
+ url: '/packages/mycourse/detail?id=' + that.info.id
+ })
+ }, 1500)
+ })
+ return
+ }
// 收费的不限制报名人数 total没值也不限制
-
// 免费的限制报名人数
if (!this.info.is_fee && (this.info.total && this.info.total > 0)) {
// 报名人数已满
@@ -175,7 +203,6 @@
},
// 去绑定登录
goBind() {
- console.log("qwe")
uni.navigateTo({
url: '/packages/register/login?id=' + this.course_id
})
@@ -209,9 +236,9 @@
width: 100%;
height: 100vh;
overflow: scroll;
- padding: 40rpx 80rpx;
+ // padding: 40rpx 80rpx;
position: relative;
- padding-bottom: 340rpx;
+ padding-bottom: 115rpx;
image {
width: 100%;
@@ -282,47 +309,47 @@
}
}
- .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);
- }
+ .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);
+ }
}
}
\ No newline at end of file
diff --git a/packages/my/index.vue b/packages/my/index.vue
index 7f72140..e176b3f 100644
--- a/packages/my/index.vue
+++ b/packages/my/index.vue
@@ -9,14 +9,15 @@
{{form.sex}}
+
+
+
- {{form.idcard}}
+
- {{form.birthday}}
-
-
-
+
@@ -28,17 +29,18 @@
placeholder="请选择职务" />
-
-
-
-
- {{item}}
-
-
-
- 新增
+
+
+
+
+ {{item}}
+
+
+
+ 新增
-
+
@@ -54,7 +56,7 @@
绑定车牌号
-
+
@@ -78,8 +80,8 @@
return {
showPosition: false,
positionList: [],
- form: {
-
+ form: {
+
},
plateList: [],
showPark: false,
@@ -97,11 +99,19 @@
message: '手机号码不正确',
trigger: ['blur'],
}],
- email: [{
- required: true,
- message: '请输入邮箱',
+ idcard: [{
+ validator: (rule, value, callback) => {
+ console.log("value", value, this.base.isNull(value))
+ if (!this.base.isNull(value)) {
+ return this.$u.test.idCard(value);
+ } else {
+ return true
+ }
+ },
+ message: '身份证号不正确',
trigger: ['blur'],
- }, {
+ }],
+ email: [{
validator: (rule, value, callback) => {
return this.$u.test.email(value);
},
@@ -136,7 +146,7 @@
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(',')
@@ -156,34 +166,36 @@
}
// this.plateList.push('')
this.showPark = true
- },
- delPlate(index){
- this.plateList.splice(index,1)
- this.saveUser('del')
+ },
+ delPlate(index) {
+ this.plateList.splice(index, 1)
+ this.saveUser('del')
},
changeMobile() {
- },
- plateChange(val){
- this.plate1 = val.join('')
+ },
+ plateChange(val) {
+ this.plate1 = val.join('')
+
},
saveUser(type) {
- 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
+ if (type == 'add') {
+ console.log("this.plate1", this.plate1)
+
+ if (this.base.isNull(this.plate1) || 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(",")
+ }
+ if (type == 'del') {
+ this.form.plate = this.plateList.join(",")
}
console.log("plateList", this.plateList)
let that = this
@@ -191,25 +203,26 @@
if (valid) {
this.$u.api.saveUser(this.form).then(res => {
this.showPark = false
- this.plate1 = ''
- let toastTitle = "更新用户信息成功"
- if(type==='add'){
- toastTitle = "新增车牌成功"
- }else if(type==='del'){
- toastTitle = "删除车牌成功"
- }else{
- toastTitle = "更新用户信息成功"
+ this.plate1 = ''
+ let toastTitle = "更新用户信息成功"
+ if (type === 'add') {
+ toastTitle = "新增车牌成功"
+ } else if (type === 'del') {
+ toastTitle = "删除车牌成功"
+ } else {
+ toastTitle = "更新用户信息成功"
}
+ this.$refs.plates.panelReset()
this.base.toast(toastTitle, 2000, function() {
- if (type === 'add' || type==='del') {
+ if (type === 'add' || type === 'del') {
that.getUserInfo()
- } else {
- setTimeout(function(){
- uni.switchTab({
- url: '/pages/me/index'
- })
- },2000)
-
+ } else {
+ setTimeout(function() {
+ uni.switchTab({
+ url: '/pages/me/index'
+ })
+ }, 2000)
+
}
})
diff --git a/packages/mybook/index.vue b/packages/mybook/index.vue
index 9e01d52..bcae19c 100644
--- a/packages/mybook/index.vue
+++ b/packages/mybook/index.vue
@@ -17,7 +17,9 @@
场地预约
- {{item.status_text}}
+
+ {{statusList[item.status]}}
+
@@ -64,7 +66,14 @@
current_page: 1,
total_page: 0,
load_status: '',
- book_list: [],
+ book_list: [],
+ statusList:{
+ 0:'待审核',
+ 1:'通过',
+ 2:'审核不通过',
+ 3:'已取消',
+
+ }
}
},
onLoad() {
diff --git a/packages/mycourse/coursePay.vue b/packages/mycourse/coursePay.vue
index 1e3909f..40aa074 100644
--- a/packages/mycourse/coursePay.vue
+++ b/packages/mycourse/coursePay.vue
@@ -69,7 +69,7 @@
},
onLoad(options) {
this.course_id = options.id
- let token = uni.getStorageSync('stbc_lifeData') ? uni.getStorageSync('stbc_lifeData').vuex_token : ''
+ let token = uni.getStorageSync('stbc1_lifeData') ? uni.getStorageSync('stbc1_lifeData').vuex_token : ''
this.header.Authorization = `Bearer ${token}`
this.getCourseDetail(options.id)
diff --git a/packages/mycourse/courseStatus.vue b/packages/mycourse/courseStatus.vue
index af031ad..41be9ec 100644
--- a/packages/mycourse/courseStatus.vue
+++ b/packages/mycourse/courseStatus.vue
@@ -6,11 +6,11 @@
{{userInfo.username}}:
- {{wait_tip}}
+ {{info.reason?info.reason:wait_tip}}
{{userInfo.username}}:
- {{pass_tip}}
+ {{info.reason?info.reason:pass_tip}}
上传缴费信息
@@ -19,11 +19,11 @@
{{userInfo.username}}:
- {{fault_tip}}
+ {{info.reason?info.reason:fault_tip}}
{{userInfo.username}}:
- {{back_tip}}
+ {{info.reason?info.reason:back_tip}}
diff --git a/packages/mycourse/courseTxl.vue b/packages/mycourse/courseTxl.vue
index c546683..88f4543 100644
--- a/packages/mycourse/courseTxl.vue
+++ b/packages/mycourse/courseTxl.vue
@@ -2,27 +2,49 @@
+
+
+
+
+
+
+
+
+ {{teacher.name}}
+ 班主任
+
+
+
+
+ {{teacher.mobile?teacher.mobile:''}}
+
+
+
+
+
+
-
@@ -40,35 +62,39 @@
},
data() {
return {
-
+
list: [],
+ teacher: null,
+ studentList:[]
}
},
onLoad(options) {
this.getMyCourseTxl(options.id)
},
methods: {
- async getMyCourseTxl(id) {
- const res = await this.$u.api.courseUserList({
- course_id: id,
- type: 2
+ async getMyCourseTxl(id) {
+ const res = await this.$u.api.courseUserList({
+ course_id: id,
+ type: 2
})
- this.list = res.list
+ // res.list.map(item=>{
+
+ // })
+ this.list = res.list
+ this.teacher = res.teacher
},
}
}
-
\ No newline at end of file
diff --git a/packages/register/index.vue b/packages/register/index.vue
index 9e67eca..0b3fd53 100644
--- a/packages/register/index.vue
+++ b/packages/register/index.vue
@@ -9,16 +9,13 @@
-
-
-
+
-
+
@@ -75,13 +72,7 @@
required: true,
message: '请选择性别',
trigger: ['change','blur'],
- }],
- birthday: [{
- required: true,
- message: '请选择出生日期',
- trigger: ['change','blur'],
- }],
-
+ }],
mobile: [{
required: true,
message: '请输入联系方式',
@@ -93,28 +84,13 @@
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'],
- }],
+ // email: [{
+ // validator: (rule, value, callback) => {
+ // return this.$u.test.email(value);
+ // },
+ // message: '邮箱不正确',
+ // trigger: ['blur'],
+ // }],
}
}
@@ -149,19 +125,20 @@
saveUser() {
let that = this
this.$refs.uForm.validate(valid => {
- if (valid) {
+ if (valid) {
+ this.form.name = this.form.username
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(){
+ console.log("that.course_id",that.course_id)
if(that.course_id){
- // uni.redirectTo({
- // url:'/packages/apply/index?id='+that.course_id
- // })
uni.redirectTo({
- url:'/pages/course/index'
+ url:'/packages/course/detail?id='+that.course_id
})
+ // uni.redirectTo({
+ // url:'/pages/course/index'
+ // })
}else{
uni.switchTab({
url: '/pages/me/index'
diff --git a/packages/schoolmate/index.vue b/packages/schoolmate/index.vue
index c6b563d..1a5cf2e 100644
--- a/packages/schoolmate/index.vue
+++ b/packages/schoolmate/index.vue
@@ -9,8 +9,6 @@
-
-
@@ -18,24 +16,6 @@
-
@@ -122,16 +102,8 @@
},
current: 0,
list: [],
- scrollTop: 0,
- indexList: ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S",
- "T", "U",
- "V", "W", "X", "Y", "Z", "#"
- ]
}
},
- onPageScroll(e) {
- this.scrollTop = e.scrollTop;
- },
onLoad() {
this.getMyCourseTxl()
this.getIndustry()
@@ -148,12 +120,6 @@
company_industry: this.select.company_industry,
type: 1
})
- res.list.map(item => {
- if (!item.letter) {
- item.letter = "#"
- item.name = item.username
- }
- })
this.list = res.list
this.showSearch = false
@@ -274,7 +240,8 @@
.wrap {
position: relative;
padding-top: 100rpx;
-
+ height:100%;
+ overflow: scroll;
.nodata {
height: calc(100vh - 160rpx);
}
diff --git a/packages/webview/index.vue b/packages/webview/index.vue
index eb5524c..8da9475 100644
--- a/packages/webview/index.vue
+++ b/packages/webview/index.vue
@@ -8,20 +8,24 @@
export default{
data(){
return{
- link:''
+ link:'',
+ baseUrl:'https://szsatbc2024.115.langye.net'
}
},
onLoad(options) {
// http://szsatbc2024.115.langye.net
if(options.type==1){
// 关于我们
- this.link = 'https://szsatbc2024.115.langye.net/about/aboutinfo/?from=wx'
+ this.link = this.baseUrl+'/about/aboutinfo/?from=wx'
}else if(options.type==2){
// 资讯
- this.link = `https://szsatbc2024.115.langye.net/news/?from=wx`
+ this.link = this.baseUrl+`/news/?from=wx`
}else if(options.type==3){
// 资讯详情
- this.link = `https://szsatbc2024.115.langye.net${options.url}?from=wx`
+ this.link = this.baseUrl+`${options.url}?from=wx`
+ }else if(options.type==4){
+ // 联系我们
+ this.link = this.baseUrl+`/contact/?from=wx`
}
},
methods:{
diff --git a/pages.json b/pages.json
index f164cb4..2ace620 100644
--- a/pages.json
+++ b/pages.json
@@ -34,7 +34,7 @@
},{
"path": "course/detail",
"style": {
- "navigationBarTitleText": "课程详情"
+ "navigationBarTitleText": ""
}
},{
"path": "register/index",
@@ -57,6 +57,11 @@
"style": {
"navigationBarTitleText": "我要预约"
}
+ },{
+ "path": "booksubmit/appointment",
+ "style": {
+ "navigationBarTitleText": "场地预约"
+ }
},{
"path": "schoolmate/index",
"style": {
diff --git a/pages/book/index.vue b/pages/book/index.vue
index 2670efb..f187a49 100644
--- a/pages/book/index.vue
+++ b/pages/book/index.vue
@@ -1,41 +1,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{item.name}}
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
@@ -51,8 +19,7 @@
user: {},
can_appointment: false,
is_schoolmate: 0,
- door_appointments: false, // 当前是否有预约
- siteList:[]
+ door_appointments: false, // 当前是否有预约
}
},
onShareAppMessage() {
@@ -71,33 +38,8 @@
this.getUser()
},
onLoad() {
- this.getSites()
},
- methods: {
- // 场地
- getSites() {
- this.$u.api.otherConfig().then(res => {
- let _arr = res.appointment.filter(item=>item.status===1)
- _arr.map(site=>{
- site.current_swiper = 1
- })
- this.siteList = this.base.deepCopy(_arr)
- })
- },
- // changeCurrent(e,item){
- // console.log(e,item)
- // if(e.detail.current+2>item.files.length){
- // this.$set(item,'current_swiper',e.detail.current+2)
-
- // }else{
- // this.$set(item,'current_swiper',e.detail.current+2)
-
- // }
- // // item.current_swiper = e.detail.current+1
-
- // // this.siteList[index]['current_swiper'] = e.detail.current + 1
- // console.log("item.current_swiper",item.current_swiper)
- // },
+ methods: {
getUser() {
this.$u.api.user().then(res => {
console.log("res", res)
@@ -122,7 +64,7 @@
return
}
uni.navigateTo({
- url: '/packages/booksubmit/index'
+ url: '/packages/booksubmit/appointment'
})
} else if (type === 2) {
@@ -153,81 +95,24 @@
left: 0;
width: 100%;
height: 100vh;
- }
-
- .book-top {
- position: relative;
- padding: 80rpx 0 60rpx 0;
-
- image {
- width: 539rpx;
- height: 88rpx;
- display: block;
- margin: 0 auto;
- }
-
- text {
- width: 1rpx;
- height: 220rpx;
- background-color: #271f8e;
- display: block;
- position: absolute;
- top: 50rpx;
- left: 60rpx;
- z-index: 99;
- }
- }
-
- .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;
- }
- }
- }
- }
- }
+ }
+ .schoolmate{
+ width:367rpx;
+ height:186rpx;
+ position: absolute;
+ top: 300rpx;
+ left: 30rpx;
+ }
+ .book{
+ width:367rpx;
+ height:186rpx;
+ position: absolute;
+ bottom: 300rpx;
+ right: 30rpx;
+ }
+
+
+
}
\ No newline at end of file
diff --git a/pages/course/index.vue b/pages/course/index.vue
index 4b00522..946ba89 100644
--- a/pages/course/index.vue
+++ b/pages/course/index.vue
@@ -5,40 +5,32 @@
-
+
+
-
-
- {{convertToChineseMonth(item.sign_start_date,item.sign_date_status).month}}
-
- {{convertToChineseMonth(item.sign_start_date,item.sign_date_status).year}}
-
-
- {{convertToChineseMonth(item.sign_start_date).month}}
- {{convertToChineseMonth(item.sign_start_date).day}}
- {{convertToChineseMonth(item.sign_start_date).year}}
+
+
+ {{convertToChineseMonth(item.sign_start_date).month}}
+ {{convertToChineseMonth(item.sign_start_date).day}}
+ {{convertToChineseMonth(item.sign_start_date).year}}
+
+ 报名{{item.sign_date_status}}
- {{item.type_detail.name}}
+ {{item.is_fee===1?'付费':'公益'}}
{{item.name}}
- 报名{{item.sign_date_status}}
+ 我要报名
+ 查看详情
-
-
-
- 我要报名
-
@@ -98,15 +90,15 @@
}
},
onShareAppMessage() {
- return{
- title:"苏州科技商学院",
- imageUrl:"/static/share.jpg"
+ return {
+ title: "苏州科技商学院",
+ imageUrl: "/static/share.jpg"
}
},
onShareTimeline() {
- return{
- title:"苏州科技商学院",
- imageUrl:"/static/share.jpg"
+ return {
+ title: "苏州科技商学院",
+ imageUrl: "/static/share.jpg"
}
},
onLoad() {
@@ -116,7 +108,7 @@
},
onShow() {
this.showRegister = false
- let user = uni.getStorageSync("stbc_lifeData") ? uni.getStorageSync("stbc_lifeData").vuex_user : {}
+ let user = uni.getStorageSync("stbc1_lifeData") ? uni.getStorageSync("stbc1_lifeData").vuex_user : {}
if (!this.base.isNull(user.mobile)) {
this.hasMobile = true
} else {
@@ -146,7 +138,7 @@
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) {
@@ -155,31 +147,23 @@
this.course_list.push(...res.data)
},
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
- }
+ // 解析日期字符串
+ 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(item) {
@@ -187,10 +171,7 @@
url: '/packages/course/detail?id=' + item.id
})
return
-
-
this.go_course_id = item.id
-
// 收费的不限制报名人数 total没值也不限制
// 免费的限制报名人数
@@ -274,38 +255,47 @@
border-radius: 10rpx;
&-wrap {
- width: calc(100% - 150rpx);
+ width: 100%;
display: flex;
-
&-time {
padding: 30rpx;
background: linear-gradient(to bottom, #5e5fbc, #0d0398);
border-radius: 10rpx 0 0 10rpx;
color: #fff;
- width: 120rpx;
+ width: 170rpx;
text-align: center;
- font-size: 24rpx;
+ font-size: 0rpx;
position: relative;
-
&>view {
position: absolute;
top: 50%;
left: 50%;
- transform: translate(-50%, -50%);
+ transform: translate(-50%, -50%);
+ width:100%;
+ padding:25rpx;
+ >view{
+ font-size: 24rpx;
+ }
}
.bigFont {
font-size: 50rpx;
- border-bottom: 1rpx solid #ddd;
+ // border-bottom: 1rpx solid #ddd;
+ }
+ &-date{
+ padding-bottom:15rpx;
+ border-bottom: 1rpx solid #fff;
+
+ }
+ &-status{
+ padding-top:10rpx;
}
}
&-status {
- margin: 20rpx;
- border-right: 1px solid #ddd;
- width: calc(100% - 120rpx);
- margin-right: 0;
- padding-right: 20rpx;
+ // border-right: 1px solid #ddd;
+ width: calc(100% - 170rpx);
+ padding: 30rpx;
position: relative;
&-type {
@@ -334,71 +324,34 @@
}
&-label {
- padding: 5rpx 20rpx;
- border: 1px solid #cfcfcf;
- border-radius: 30rpx;
- display: inline-block;
- position: relative;
-
- &:before {
- content: " ";
- background: #00b318;
+ text-align: right;
+
+ text {
+ display: inline-block;
+ padding: 5rpx 20rpx;
+ border: 1px solid #cfcfcf;
+ border-radius: 30rpx;
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;
- text-align: center;
- }
- }
- // 未开始
- &-start {
- .list-item-wrap {
- width: 100%;
-
- &-time {
- background: linear-gradient(to bottom, #cf847d, #b00d10);
- }
-
- &-status {
- border-right: none;
-
- &-type {
- &>text {
- background: linear-gradient(to right, #cf847d, #b00d10);
+ &:before {
+ content: " ";
+ background: #00b318;
+ display: inline-block;
+ width: 10rpx;
+ height: 10rpx;
+ top: -5rpx;
+ position: relative;
+ // top: -2rpx;
+ margin-right: 14rpx;
+ border-radius: 50%;
+ }
}
- }
- &-label {
- &:before {
- content: " ";
- background: #cfcfcf;
- }
}
}
-
}
- .list-item-btn {
- display: none;
- }
}
@@ -420,11 +373,14 @@
}
}
- &-label {
- &:before {
- content: " ";
- background: #cfcfcf;
+ &-label {
+ text{
+ &:before {
+ content: " ";
+ background: #efa36e;
+ }
}
+
}
}
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 2056e72..62cb304 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -96,7 +96,7 @@
onLoad() {
let menuButtonObject = uni.getMenuButtonBoundingClientRect();
this.topNavHeight = menuButtonObject.height + 8
- let token = uni.getStorageSync('stbc_lifeData') ? uni.getStorageSync('stbc_lifeData').vuex_token : ''
+ let token = uni.getStorageSync('stbc1_lifeData') ? uni.getStorageSync('stbc1_lifeData').vuex_token : ''
if (this.base.isNull(token)) {
this.getToken()
}
@@ -131,7 +131,7 @@
this.$u.api.login({
code: res.code
}).then(res1 => {
- uni.setStorageSync("stbc_lifeData", {
+ uni.setStorageSync("stbc1_lifeData", {
'vuex_token': res1.token
})
uni.request({
@@ -141,7 +141,7 @@
},
method: "GET",
success(res2) {
- uni.setStorageSync("stbc_lifeData", {
+ uni.setStorageSync("stbc1_lifeData", {
'vuex_token': res1.token,
"vuex_user": res2.data.user
})
diff --git a/pages/me/index.vue b/pages/me/index.vue
index 1b52089..5675815 100644
--- a/pages/me/index.vue
+++ b/pages/me/index.vue
@@ -4,20 +4,32 @@
-
- {{userInfo.username?userInfo.username:'-'}}
-
+
+
+
+
+
+ {{userInfo.username?userInfo.username:'-'}}
+
+
+ {{userInfo.mobile?userInfo.mobile:''}}
+
+
+
+
+
+
-
- 学籍:
- 【{{userInfo.course_signs[0]['course'].name}}】
+
+ 学籍:
+ 【{{userInfo.course_signs[0]['course'].name}}】
@@ -121,20 +139,21 @@
type: 'register',
showGzh: false,
showCard: false,
- userInfo: {}
+ userInfo: {},
+ hasMobile:false
+ }
+ },
+ onShareAppMessage() {
+ return {
+ title: "苏州科技商学院",
+ imageUrl: "/static/share.jpg"
+ }
+ },
+ onShareTimeline() {
+ return {
+ title: "苏州科技商学院",
+ imageUrl: "/static/share.jpg"
}
- },
- onShareAppMessage() {
- return{
- title:"苏州科技商学院",
- imageUrl:"/static/share.jpg"
- }
- },
- onShareTimeline() {
- return{
- title:"苏州科技商学院",
- imageUrl:"/static/share.jpg"
- }
},
onShow() {
this.showRegister = false
@@ -142,7 +161,12 @@
},
onLoad() {},
methods: {
- refreshCode() {
+ refreshCode() {
+ if(!this.hasMobile){
+ this.base.toast("请先绑定或注册")
+ this.showRegister = true
+ return
+ }
this.showCard = true
this.$refs.uqrcode.make({
success: () => {
@@ -152,9 +176,17 @@
console.log(err)
}
});
-
},
- tourl(type) {
+ toUrl(type) {
+ if(type===1 || type===2 || type===3){
+ if(!this.hasMobile){
+ this.base.toast("请先绑定或注册")
+ this.showRegister = true
+ return
+ }
+ }
+
+
if (type === 1) {
uni.navigateTo({
url: '/packages/my/index'
@@ -167,6 +199,10 @@
uni.navigateTo({
url: '/packages/mybook/index'
})
+ } else if (type === 4) {
+ uni.navigateTo({
+ url: '/packages/webview/index?type=4'
+ })
}
},
getUserInfo() {
@@ -175,9 +211,11 @@
this.$u.vuex('vuex_user', res.user)
this.userInfo = res.user
if (this.base.isNull(res.user.mobile)) {
- this.showRegister = true
+ this.showRegister = true
+ this.hasMobile = false
} else {
- this.showRegister = false
+ this.showRegister = false
+ this.hasMobile = true
}
})
},
@@ -227,31 +265,42 @@
height: 435rpx;
}
+ &-wrap {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ position: absolute;
+ top: 120rpx;
+ left: 0;
+ padding: 0 30rpx;
+ width: 100%;
+ }
+
&-name {
+ display: flex;
+ align-items: center;
+
+ image {
+ width: 110rpx;
+ height: 110rpx;
+ margin-right: 20rpx;
+ }
+
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;
+ top: 320rpx;
width: 100%;
background-color: #fff;
// z-index: 999;
border-radius: 40rpx 40rpx 0 0;
- height: calc(100% - 240rpx);
+ height: calc(100% - 320rpx);
padding: 40rpx;
+ overflow: scroll;
&>view {
padding: 30rpx;
diff --git a/store/index.js b/store/index.js
index 9d5994b..31b52d9 100644
--- a/store/index.js
+++ b/store/index.js
@@ -2,11 +2,11 @@ import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
-let stbc_lifeData = {};
+let stbc1_lifeData = {};
try{
- // 尝试获取本地是否存在stbc_lifeData变量,第一次启动APP时是不存在的
- stbc_lifeData = uni.getStorageSync('stbc_lifeData');
+ // 尝试获取本地是否存在stbc1_lifeData变量,第一次启动APP时是不存在的
+ stbc1_lifeData = uni.getStorageSync('stbc1_lifeData');
}catch(e){
}
@@ -15,26 +15,26 @@ try{
let saveStateKeys = ['vuex_user', 'vuex_token','vuex_share'];
// 保存变量到本地存储中
-const savestbc_LifeData = function(key, value){
+const savestbc1_LifeData = function(key, value){
// 判断变量名是否在需要存储的数组中
if(saveStateKeys.indexOf(key) != -1) {
- // 获取本地存储的stbc_lifeData对象,将变量添加到对象中
- let tmp = uni.getStorageSync('stbc_lifeData');
- // 第一次打开APP,不存在stbc_lifeData变量,故放一个{}空对象
+ // 获取本地存储的stbc1_lifeData对象,将变量添加到对象中
+ let tmp = uni.getStorageSync('stbc1_lifeData');
+ // 第一次打开APP,不存在stbc1_lifeData变量,故放一个{}空对象
tmp = tmp ? tmp : {};
tmp[key] = value;
- // 执行这一步后,所有需要存储的变量,都挂载在本地的stbc_lifeData对象中
- uni.setStorageSync('stbc_lifeData', tmp);
+ // 执行这一步后,所有需要存储的变量,都挂载在本地的stbc1_lifeData对象中
+ uni.setStorageSync('stbc1_lifeData', tmp);
}
}
const store = new Vuex.Store({
// 下面这些值仅为示例,使用过程中请删除
state: {
- // 如果上面从本地获取的stbc_lifeData对象下有对应的属性,就赋值给state中对应的变量
+ // 如果上面从本地获取的stbc1_lifeData对象下有对应的属性,就赋值给state中对应的变量
// 加上vuex_前缀,是防止变量名冲突,也让人一目了然
- vuex_user: stbc_lifeData.vuex_user ? stbc_lifeData.vuex_user : {},
- vuex_token: stbc_lifeData.vuex_token ? stbc_lifeData.vuex_token : '',
- // 如果vuex_version无需保存到本地永久存储,无需stbc_lifeData.vuex_version方式
+ vuex_user: stbc1_lifeData.vuex_user ? stbc1_lifeData.vuex_user : {},
+ vuex_token: stbc1_lifeData.vuex_token ? stbc1_lifeData.vuex_token : '',
+ // 如果vuex_version无需保存到本地永久存储,无需stbc1_lifeData.vuex_version方式
vuex_version: '1.0.0',
vuex_sign_base64: '',
@@ -59,7 +59,7 @@ const store = new Vuex.Store({
saveKey = payload.name;
}
// 保存变量到本地,见顶部函数定义
- savestbc_LifeData(saveKey, state[saveKey])
+ savestbc1_LifeData(saveKey, state[saveKey])
}
}
})