diff --git a/common/http.api.js b/common/http.api.js index 2a2fe6e..6c8366a 100644 --- a/common/http.api.js +++ b/common/http.api.js @@ -28,7 +28,8 @@ let apiApp = { // 其他 otherConfig: '/api/mobile/other/config', otherBanner: '/api/mobile/other/banner', - otherUploadFile: '/api/mobile/upload-file', + otherUploadFile: '/api/mobile/upload-file', + getparameter:'/api/admin/parameter/show' } @@ -65,7 +66,17 @@ const install = (Vue, vm) => { // 其他 let otherConfig = (params = {}) => vm.$u.get(apiApp.otherConfig, params); let otherBanner = (params = {}) => vm.$u.get(apiApp.otherBanner, params); - let otherUploadFile = (params = {}) => vm.$u.post(apiApp.otherUploadFile, params); + let otherUploadFile = (params = {}) => vm.$u.post(apiApp.otherUploadFile, params); + let getparameter = (params = {}) => vm.$u.get(apiApp.getparameter, params); + // export function getparameter(param, loading = true) { + // return request({ + // url: '/api/admin/parameter/show', + // method: 'get', + // params: param, + // paramsSerializer: customParamsSerializer, + // isLoading: loading + // }) + // } // 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下 vm.$u.api = { @@ -97,7 +108,8 @@ const install = (Vue, vm) => { // 其他 otherConfig, otherBanner, - otherUploadFile, + otherUploadFile, + getparameter:getparameter }; } diff --git a/components/applyForm/index.vue b/components/applyForm/index.vue index 5328fde..de9a5c3 100644 --- a/components/applyForm/index.vue +++ b/components/applyForm/index.vue @@ -191,18 +191,16 @@ } .form-btn { width: 100%; - // position: fixed; - // left: 0; - // bottom: 0; - padding: 20rpx 0; - - &>view{ + position: relative; + padding: 60rpx 0; + + &>view { width: 70%; text-align: center; margin: 0 auto; color: #fff; - background-color: #010296; - border-radius: 10rpx; + background: linear-gradient(to right, #5e5fbc, #0d0398); + border-radius: 30rpx; padding: 20rpx; } } diff --git a/components/plate/index.vue b/components/plate/index.vue new file mode 100644 index 0000000..f0540fc --- /dev/null +++ b/components/plate/index.vue @@ -0,0 +1,235 @@ + + + + + diff --git a/components/tabbar/tabbar.vue b/components/tabbar/tabbar.vue index 947a709..7dd12ee 100644 --- a/components/tabbar/tabbar.vue +++ b/components/tabbar/tabbar.vue @@ -44,8 +44,8 @@ height: 48, "text": "课程中心", "pagePath": "/pages/course/index", - "iconPath": require("@/static/index_icon1.png"), - "selectedIconPath": require("@/static/index_icon1.png") + "iconPath": require("@/static/index_icon1-2.png"), + "selectedIconPath": require("@/static/index_icon1-2.png") }, { id: 2, @@ -54,8 +54,8 @@ height: 48, "text": "校友权益", "pagePath": "/pages/book/index", - "iconPath": require("@/static/index_icon1.png"), - "selectedIconPath": require("@/static/index_icon1.png") + "iconPath": require("@/static/index_icon1-3.png"), + "selectedIconPath": require("@/static/index_icon1-3.png") }, { id: 3, @@ -64,8 +64,8 @@ height: 48, "text": "我的", "pagePath": "/pages/me/index", - "iconPath": require("@/static/index_icon1.png"), - "selectedIconPath": require("@/static/index_icon1.png") + "iconPath": require("@/static/index_icon1-4.png"), + "selectedIconPath": require("@/static/index_icon1-4.png") }, ] }; diff --git a/components/topBanner.vue b/components/topBanner.vue new file mode 100644 index 0000000..933b162 --- /dev/null +++ b/components/topBanner.vue @@ -0,0 +1,105 @@ + + + + + \ No newline at end of file diff --git a/packages/apply/index.vue b/packages/apply/index.vue index cdfb686..29ad9a8 100644 --- a/packages/apply/index.vue +++ b/packages/apply/index.vue @@ -3,17 +3,29 @@ - - - + + + + + + + + + + + + + - - - - + + + + + + + @@ -23,6 +35,10 @@ 提交 --> + + + @@ -35,6 +51,17 @@ data() { return { course_id: '', + showPosition: false, + positionList: [], + dateShow: false, + dateParams: { + year: true, + month: true, + day: true, + hour: false, + minute: false, + second: false + }, form: {}, apply_form: [], course_forms: [], @@ -50,13 +77,52 @@ username: [{ required: true, message: '请输入姓名', - trigger: ['change', 'blur'], + trigger: ['blur'], }], sex: [{ required: true, message: '请选择性别', trigger: ['change', 'blur'], }], + birthday: [{ + required: true, + message: '请选择出生日期', + trigger: ['change', 'blur'], + }], + + mobile: [{ + required: true, + message: '请输入联系方式', + trigger: ['blur'], + }, { + validator: (rule, value, callback) => { + return this.$u.test.mobile(value); + }, + message: '手机号码不正确', + trigger: ['blur'], + }], + idcard: [{ + required: true, + message: '请输入身份证号', + trigger: ['blur'], + }, { + validator: (rule, value, callback) => { + return this.$u.test.idCard(value); + }, + message: '身份证号不正确', + trigger: ['blur'], + }], + email: [{ + required: true, + message: '请输入邮箱', + trigger: ['blur'], + }, { + validator: (rule, value, callback) => { + return this.$u.test.email(value); + }, + message: '邮箱不正确', + trigger: ['blur'], + }], } } }, @@ -68,11 +134,27 @@ this.getCourseDetail(options.id) let user = uni.getStorageSync("stbc_lifeData") ? uni.getStorageSync("stbc_lifeData").vuex_user : {} this.form = user + this.getPosition() }, methods: { selectSex(e) { console.log("e", e) this.form.sex = this.sexList[e[0]]['value'] + }, + selectPosition(e){ + this.form.company_position = this.positionList[e[0]]['value'] + + }, + // 日期 + dateConfirm(e) { + this.form.birthday = e.year + '-' + e.month + '-' + e.day + }, + getPosition(){ + this.$u.api.getparameter({ + number:'company_position' + }).then(res=>{ + this.positionList = res.detail + }) }, async getCourseDetail(id) { const res = await this.$u.api.courseDetail({ @@ -95,28 +177,41 @@ this.apply_form = _arr console.log("this.apply_form", this.apply_form) // return - this.saveUser() - this.applyCourse() + + this.$refs.uForm.validate(valid => { + if (valid) { + this.saveUser() + this.applyCourse() + } else { + console.log('验证失败'); + // this.base.toast("注册失败") + } + }); + }, saveUser() { - this.$u.api.saveUser(this.form).then(res => { - this.base.toast("更新用户信息成功") - this.$u.api.user().then(res => { - // let stor = uni.getStorageSync('stbc_lifeData') - // stor.vuex_user = res.user - // uni.setStorageSync('stbc_lifeData',stor) - this.$u.vuex('vuex_user', res.user) - }) + this.$u.api.saveUser(this.form).then(res => { + // this.base.toast("更新用户信息成功") + this.$u.api.user().then(res => { + // let stor = uni.getStorageSync('stbc_lifeData') + // stor.vuex_user = res.user + // uni.setStorageSync('stbc_lifeData',stor) + this.$u.vuex('vuex_user', res.user) + }) }) + }, applyCourse() { this.$u.api.courseSign({ course_id: this.course_id, data: this.apply_form }).then(res => { - this.base.toast("欢迎您报名本课程,我们将在1-3个工作日内审核并通知您报名结果…") + this.base.toast("报名成功") + uni.redirectTo({ + url: '/packages/mycourse/index' + }) }) }, } @@ -139,8 +234,10 @@ .wrap { background-color: #fff; padding: 20rpx 50rpx; - border-radius: 20rpx; - position: relative; + border-radius: 20rpx; + position: relative; + height: 100%; + overflow: scroll; } .form-btn { diff --git a/packages/booksubmit/index.vue b/packages/booksubmit/index.vue index 09173a2..421b5f8 100644 --- a/packages/booksubmit/index.vue +++ b/packages/booksubmit/index.vue @@ -2,24 +2,31 @@ - + - - - - + + + + - + 新增 + + + + 删除 + + - 新增 + 新增 + 当前场地最多可预约{{siteTotal}}人 姓名 @@ -28,7 +35,7 @@ {{item.name}} - + 删除 @@ -46,7 +53,19 @@ - + + + + + 车牌号 + + + + + 确认 + + + @@ -69,10 +88,14 @@ - \ No newline at end of file diff --git a/packages/mybook/detail.vue b/packages/mybook/detail.vue index 0558129..36b12fa 100644 --- a/packages/mybook/detail.vue +++ b/packages/mybook/detail.vue @@ -1,71 +1,124 @@ - - \ No newline at end of file diff --git a/packages/register/login.vue b/packages/register/login.vue new file mode 100644 index 0000000..fbc987b --- /dev/null +++ b/packages/register/login.vue @@ -0,0 +1,212 @@ + + + + + \ No newline at end of file diff --git a/packages/schoolmate/index.vue b/packages/schoolmate/index.vue index 46890d0..0ff2265 100644 --- a/packages/schoolmate/index.vue +++ b/packages/schoolmate/index.vue @@ -4,7 +4,7 @@ - {{item.username}} + {{item.username}} {{item.company_name}} {{item.company_position}} @@ -24,11 +24,11 @@ list: [] } }, - onLoad(options) { - this.getMyCourseTxl(options.id) + onLoad() { + this.getMyCourseTxl() }, methods: { - async getMyCourseTxl(id) { + async getMyCourseTxl() { const res = await this.$u.api.courseUserList({ // course_id: id, type: 1 @@ -61,9 +61,18 @@ height: 100vh; } &-item { - margin: 30rpx; + margin: 30rpx 0; padding: 30rpx; background-color: #fff; + border-radius: 20rpx; + &>view{ + margin-bottom:10rpx; + + } + &-name{ + font-size: 32rpx; + color:#333; + } } } } diff --git a/pages.json b/pages.json index 663103c..1c70d6a 100644 --- a/pages.json +++ b/pages.json @@ -51,6 +51,12 @@ "navigationBarTitleText": "注册" // "navigationStyle": "custom" } + },{ + "path": "register/login", + "style": { + "navigationBarTitleText": "登录", + "navigationStyle": "custom" + } },{ "path": "apply/index", "style": { diff --git a/pages/book/index.vue b/pages/book/index.vue index 317fc3a..a0b8e46 100644 --- a/pages/book/index.vue +++ b/pages/book/index.vue @@ -1,13 +1,39 @@