diff --git a/api/api.js b/api/api.js index 1954bd3..62472a3 100644 --- a/api/api.js +++ b/api/api.js @@ -6,25 +6,34 @@ const config = { // auth : false, showLoading : true, loadingTitle : '加载中...', // limit : 1000 // }, - getConfig : {url : '/api/getConfig', method : 'GET', limit : 500}, - // 登录接口 - loginLogin: { url: '/school/login/login', method: 'GET' , limit : 500 }, - //修改个人信息接口 - updateInfo: { url: '/api/info/updateInfo', method: 'POST' , limit : 500 }, - //增加报修单 - addSchoolOrder : {url : '/school-api/addSchoolOrder', method : 'GET', limit : 500}, - //驳回 - editSchoolOrderError : {url : '/school-api/editSchoolOrderError', method : 'GET', limit : 500}, - //结单 - editSchoolOrderSuccess : {url : '/school-api/editSchoolOrderSuccess', method : 'GET', limit : 500}, - //报修列表 - getSchoolOrderPage : {url : '/school-api/getSchoolOrderPage', method : 'GET', limit : 500}, + // 维修员登录接口(手机号) + repairLogin: { url: '/school/login/login', method: 'GET' , auth : false , showLoading : true , loadingTitle : '登录中...' , limit : 500 }, + //学生登录(微信) + studentLogin: { url: '/school/login/loginWx', method: 'GET' , auth : false , showLoading : true , loadingTitle : '登录中...' , limit : 500 }, + //微信登录用户(学生)-修改个人信息 + updateInfo: { url: '/school-api/updateUserInfo', method: 'GET' , auth : true , limit : 500 }, + //微信登录用户(学生)-获取个人信息 + getUserInfo: { url: '/school-api/getUserInfo', method: 'GET' , auth : true , limit : 500 }, + //微信登录用户(学生)-增加报修单 + addSchoolOrder : {url : '/school-api/addUserSchoolOrder', method : 'GET', auth : true , limit : 500}, + //驳回(维修员) + editSchoolOrderError : {url : '/school-api/editSchoolOrderError', method : 'GET', auth : true , limit : 500}, + //结单(维修员) + editSchoolOrderSuccess : {url : '/school-api/editSchoolOrderSuccess', method : 'GET', auth : true , limit : 500}, + //微信登录用户(学生)-报修列表 + getUserSchoolOrderPage : {url : '/school-api/getUserSchoolOrderPage', method : 'GET', auth : true , limit : 500}, //获取楼栋 - getActorGoList : {url : '/school-api/getActorGoList', method : 'GET', limit : 500}, + getActorGoList : {url : '/school-api/getActorGoList', method : 'GET', auth : false , limit : 500}, //获取室号 - getFloorList : {url : '/school-api/getFloorList', method : 'GET', limit : 500}, - //分配给维修的维修单 - getSchoolOrderList : {url : '/school-api/getSchoolOrderList', method : 'GET', limit : 500}, + getFloorList : {url : '/school-api/getFloorList', method : 'GET', auth : false , limit : 500}, + //小程序(维修员)-列表-分配给维修的订单 + getSchoolOrderList : {url : '/school-api/getUserSchoolOrderList', method : 'GET', auth : true , limit : 500}, + //隐私政策 + getPrivacyPolicy : { url : '/school/login/getPrivacyPolicy', method : 'GET', auth : false , limit : 500}, + //用户协议 + getUserAgreement : { url : '/school/login/getUserAgreement', method : 'GET', auth : false , limit : 500}, + //获取维修项目 + getRepairList : { url : '/school-api/getRepairList', method : 'GET', auth : false , limit : 500}, } @@ -60,7 +69,7 @@ export function api(key, data, callback, loadingTitle){ if (req.auth) { if (!uni.getStorageSync('token')) { uni.navigateTo({ - url: '/pages/login/mobile' + url: '/pages/login/studentLogin' }) console.error('需要登录') return diff --git a/api/http.js b/api/http.js index 9f44de7..a4b9fd8 100644 --- a/api/http.js +++ b/api/http.js @@ -29,17 +29,7 @@ function http(uri, data, callback, method = 'GET', showLoading, title) { uni.removeStorageSync('userInfo'); console.error('登录过期'); uni.navigateTo({ - url: '/pages/login/login' - }) - } - - //后端接口token出现问题 - if(res.data && res.data.code == 500 && res.data.message == '操作失败,token非法无效!'){ - uni.removeStorageSync('token'); - uni.removeStorageSync('userInfo'); - console.error('登录过期'); - uni.navigateTo({ - url: '/pages/login/login' + url: '/pages/login/studentLogin' }) } diff --git a/components/PrivacyAgreementPoup/PrivacyAgreementPoup.vue b/components/PrivacyAgreementPoup/PrivacyAgreementPoup.vue index b6834c5..6ae9f8f 100644 --- a/components/PrivacyAgreementPoup/PrivacyAgreementPoup.vue +++ b/components/PrivacyAgreementPoup/PrivacyAgreementPoup.vue @@ -6,7 +6,7 @@ - 欢迎来到校园报修!我们根据最新的法律法规、监管政策要求,更新了《用户协议》和《隐私政策》,请您认真阅读。 + 欢迎来到艺易修!我们根据最新的法律法规、监管政策要求,更新了《用户协议》和《隐私政策》,请您认真阅读。 @@ -14,10 +14,10 @@ - 同意《校园报修隐私政策》 + 同意《艺易修隐私政策》 - 以及《用户协议》 + 以及《艺易修用户协议》 diff --git a/config.js b/config.js index 6869ffe..83de8dd 100644 --- a/config.js +++ b/config.js @@ -7,14 +7,14 @@ import uvUI from '@/uni_modules/uv-ui-tools' Vue.use(uvUI) // 当前环境 -const type = 'prod' +const type = 'dev' // 环境配置 const config = { dev : { - // baseUrl : 'https://school-admin.xzaiyp.top', - baseUrl : 'http://h5.xzaiyp.top/school-api', + // baseUrl : 'http://h5.xzaiyp.top/school-api', + baseUrl : 'https://school-admin.xzaiyp.top/school-api', }, prod : { baseUrl : 'https://school-admin.xzaiyp.top/school-api', diff --git a/pages.json b/pages.json index d2515ae..4bbaccd 100644 --- a/pages.json +++ b/pages.json @@ -5,9 +5,15 @@ "navigationBarTitleText": "申请报修" } }, { - "path": "pages/login/login", + "path": "pages/login/repairLogin", "style": { - "navigationBarTitleText": "登录", + "navigationBarTitleText": "维修员登录", + "enablePullDownRefresh": false + } + }, { + "path": "pages/login/studentLogin", + "style": { + "navigationBarTitleText": "学生登录", "enablePullDownRefresh": false } }, { @@ -42,10 +48,9 @@ } }, { - "path" : "pages/order/order", - "style" : - { - "navigationBarTitleText" : "" + "path": "pages/order/order", + "style": { + "navigationBarTitleText": "我的维修单" } } ], diff --git a/pages/center/center.vue b/pages/center/center.vue index b938688..30549ca 100644 --- a/pages/center/center.vue +++ b/pages/center/center.vue @@ -4,22 +4,22 @@ - + - {{ userInfo.name }} + {{ userInfo.name || '文韵飞扬' }} - + @@ -27,7 +27,7 @@ - @@ -61,7 +61,7 @@ extraIcon2: { color: '#666666', size: '22', - type: 'chatbubble-filled' + type: 'info' }, extraIcon3: { color: '#666666', @@ -87,7 +87,7 @@ //退出登录 logout() { uni.reLaunch({ - url: '/pages/login/login' + url: '/pages/login/studentLogin' }) uni.removeStorageSync('token'); uni.removeStorageSync('userInfo'); @@ -200,4 +200,12 @@ box-sizing: border-box; border-radius: 20rpx; } + + .lists { + width: calc(100% - 40rpx); + box-sizing: border-box; + margin: 20rpx auto; + border-radius: 20rpx; + overflow: hidden; + } \ No newline at end of file diff --git a/pages/finish/finish.vue b/pages/finish/finish.vue index 123595a..008b9b2 100644 --- a/pages/finish/finish.vue +++ b/pages/finish/finish.vue @@ -117,8 +117,8 @@ methods: { //返回 leftClick() { - uni.switchTab({ - url: '/pages/center/center' + uni.reLaunch({ + url: '/pages/order/order' }) }, diff --git a/pages/login/login.vue b/pages/login/repairLogin.vue similarity index 68% rename from pages/login/login.vue rename to pages/login/repairLogin.vue index 9edfe8e..114d3ba 100644 --- a/pages/login/login.vue +++ b/pages/login/repairLogin.vue @@ -1,8 +1,8 @@ @@ -33,31 +35,21 @@ //登录 login() { if(this.form.account.trim() == ''){ - return uni.showToast({ - icon: 'none', - title: '请填写手机号' - }) + return uni.showToast({ icon: 'none' , title: '请填写手机号' }) } if(this.form.password.trim() == ''){ - return uni.showToast({ - icon: 'none', - title: '请填写密码' - }) + return uni.showToast({ icon: 'none' , title: '请填写密码' }) } - this.$api('loginLogin', this.form, res => { - if (res.code == 200) { - uni.setStorageSync('token', res.result.token); - uni.setStorageSync('userInfo', JSON.stringify(res.result.userInfo)); - this.$store.commit('setUserInfo',res.result.userInfo) - - uni.switchTab({ - url: '/pages/repair/repair' - }) - } + this.$store.commit('login' , this.form ) + }, + + //跳转到学生登录页面 + toStudentLogin(){ + uni.navigateTo({ + url: '/pages/login/studentLogin' }) } - - + } } @@ -116,23 +108,20 @@ } .loginBtn { - margin-top: 20rpx; - line-height: 85rpx; - text-align: center; - background: #3c9cff; - border-radius: 40rpx; + width: 100%; + height: 100rpx; + background-color: #00aaff; color: #fff; - margin-top: 50rpx; + display: flex; + justify-content: center; + align-items: center; + margin: 20rpx 0; + border-radius: 20rpx; } - - .registerBtn { - margin-top: 20rpx; - line-height: 85rpx; - text-align: center; - border-radius: 40rpx; - color: #ccc; - margin-top: 50rpx; - border: none; + + .b2{ + background-color: #87D0F6; + color: #fff; } .tipbox { diff --git a/pages/login/login1.vue b/pages/login/studentLogin.vue similarity index 75% rename from pages/login/login1.vue rename to pages/login/studentLogin.vue index fb7d1ae..d976f6a 100644 --- a/pages/login/login1.vue +++ b/pages/login/studentLogin.vue @@ -1,25 +1,19 @@