diff --git a/src/api/login.js b/src/api/login.js index 649f59c..b6b122a 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -1,15 +1,18 @@ import request from '@/utils/request' // 登录方法 -export function login(username, password, code, uuid) { +export function login(username, password, code, uuid, tenantName, captchaVerification,rememberMe) { const data = { username, password, code, - uuid + uuid, + tenantName, + captchaVerification, + rememberMe } return request({ - url: '/login', + url: '/admin-api/system/auth/login', headers: { isToken: false }, @@ -33,7 +36,7 @@ export function register(data) { // 获取用户详细信息 export function getInfo() { return request({ - url: '/getInfo', + url: '/admin-api/system/auth/get-permission-info', method: 'get' }) } @@ -41,7 +44,7 @@ export function getInfo() { // 退出方法 export function logout() { return request({ - url: '/logout', + url: '/admin-api/system/auth/logout', method: 'post' }) } @@ -49,7 +52,7 @@ export function logout() { // 获取验证码 export function getCodeImg() { return request({ - url: '/captchaImage', + url: '/admin-api/system/captcha/isEnable', headers: { isToken: false }, diff --git a/src/config.js b/src/config.js index 903bc2c..a6b108c 100644 --- a/src/config.js +++ b/src/config.js @@ -2,7 +2,7 @@ const config = { // baseUrl: 'https://vue.ruoyi.vip/prod-api', // baseUrl: 'http://localhost/prod-api', - baseUrl: 'http://localhost:8080', + baseUrl: 'http://127.0.0.1:48080', //cloud后台网关地址 // baseUrl: 'http://192.168.10.3:8080', // 应用信息 diff --git a/src/pages.json b/src/pages.json index 0e977d5..637b4c7 100644 --- a/src/pages.json +++ b/src/pages.json @@ -14,7 +14,7 @@ { "path": "pages/index", "style": { - "navigationBarTitleText": "若依移动端框架", + "navigationBarTitleText": "生管系统", "navigationStyle": "custom" } }, @@ -250,14 +250,20 @@ "pagePath": "pages/index", "iconPath": "static/images/tabbar/home.png", "selectedIconPath": "static/images/tabbar/home_.png", - "text": "首页" + "text": "计划" }, { "pagePath": "pages/work", "iconPath": "static/images/tabbar/work.png", "selectedIconPath": "static/images/tabbar/work_.png", - "text": "工作台" + "text": "报工" }, + { + "pagePath": "pages/work", + "iconPath": "static/images/tabbar/work.png", + "selectedIconPath": "static/images/tabbar/work_.png", + "text": "投料" + }, { "pagePath": "pages/template", "iconPath": "static/images/tabbar/work.png", diff --git a/src/pages/login.vue b/src/pages/login.vue index 620bdaa..341b9ef 100644 --- a/src/pages/login.vue +++ b/src/pages/login.vue @@ -3,18 +3,18 @@ - 若依移动端登录 + 生产运营管理系统 - + - + - + - 登录即代表同意 - 《用户协议》 - 《隐私协议》 + 《用户协议》 + 《隐私协议》 @@ -45,29 +44,19 @@ import { wxLogin } from '@/api/oauth'; import { setToken } from '@/utils/auth'; const userStore = useUserStore() const codeUrl = ref(""); -const captchaEnabled = ref(true); // 是否开启验证码 -const useWxLogin = ref(false); // 是否使用微信登录 +const captchaEnabled = ref(false); // 是否开启验证码 + const globalConfig = ref(config); const loginForm = ref({ + tenantName: '内蒙必硕', username: "admin", password: "admin123", - code: "", + captchaVerification: '', + rememberMe: '', + code: '', uuid: '' }); -if (useWxLogin.value) { - getWxCode().then(res => { - console.log(res); - wxLogin('miniapp',res).then(res => { - if(res.token != null){ - setToken(res.token); - loginSuccess() - } - }); - }) -} - - // 获取图形验证码 function getCode() { getCodeImg().then(res => { @@ -77,8 +66,8 @@ function getCode() { loginForm.value.uuid = res.uuid } }) -}; - +} +// getCode(); async function handleLogin() { if (loginForm.value.username === "") { modal.msgError("请输入您的账号") @@ -113,22 +102,7 @@ function loginSuccess(result) { }) } -// 隐私协议 -function handlePrivacy() { - let site = globalConfig.value.appInfo.agreements[0]; - uni.navigateTo({ - url: `/pages/common/webview/index?title=${site.title}&url=${site.url}` - }); -}; -// 用户协议 -function handleUserAgrement() { - let site = globalConfig.value.appInfo.agreements[1] - uni.navigateTo({ - url: `/pages/common/webview/index?title=${site.title}&url=${site.url}` - }); -}; -getCode();