| src/api/login.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/config.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/manifest.json | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/pages/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/pages/login.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/store/modules/user.ts | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/api/login.js
@@ -1,11 +1,10 @@ import request from '@/utils/request' // 登录方法 export function loginCheckFactory(username, password, factoryId) { export function loginCheckFactory(username, password) { const data = { username, password, factoryId } return request({ url: '/loginCheckFactory', src/config.js
@@ -1,11 +1,6 @@ // 应用全局配置 const config = { // baseUrl: 'https://vue.ruoyi.vip/prod-api', // baseUrl: 'http://localhost/prod-api', baseUrl: 'http://114.132.189.42:9068', // 新疆海川开心 // baseUrl: 'http://192.168.1.185:9988', // 本地测试 //cloud后台网关地址 // baseUrl: 'http://192.168.10.3:8080', baseUrl: 'http://1.15.17.182:9003', // 应用信息 appInfo: { // 应用名称 src/manifest.json
@@ -1,6 +1,6 @@ { "name" : "信息管理", "appid" : "__UNI__E1C100D", "appid" : "__UNI__099A590", "description" : "", "versionName" : "1.0.0", "versionCode" : "100", @@ -23,8 +23,7 @@ /* 模块配置 */ "modules" : { "Camera" : {}, "Barcode" : {}, "Push" : {} "Barcode" : {} }, /* 应用发布信息 */ "distribute" : { src/pages/index.vue
@@ -1,24 +1,24 @@ <template> <view class="content"> <view class="header-section"> <view class="currentFactory"> <up-text type="primary" :text="userStore.currentFactoryName" @click="show = true" size="18" class="factoryName" suffixIcon="arrow-right" :iconStyle="iconStyle"></up-text> </view> <up-picker :show="show" :columns="factoryList" @confirm="changeFactory" @cancel="show = false"></up-picker> </view> <!-- <view class="header-section">--> <!-- <view class="currentFactory">--> <!-- <up-text type="primary"--> <!-- :text="userStore.currentFactoryName"--> <!-- @click="show = true"--> <!-- size="18"--> <!-- class="factoryName"--> <!-- suffixIcon="arrow-right"--> <!-- :iconStyle="iconStyle"></up-text>--> <!-- </view>--> <!-- <up-picker :show="show"--> <!-- :columns="factoryList"--> <!-- @confirm="changeFactory"--> <!-- @cancel="show = false"></up-picker>--> <!-- </view>--> <view class="hero-section"> <view class="bg-img"> <view class="hero-content"> <text class="hero-title">军泰伟业</text> <!-- <text class="hero-title">军泰伟业</text>--> </view> <view class="hero-wave"></view> </view> @@ -220,8 +220,7 @@ import modal from "@/plugins/modal"; import useUserStore from "@/store/modules/user"; const userStore = useUserStore(); const factoryId = ref(""); const userStore = useUserStore();; const show = ref(false); const factoryList = ref([]); const factoryListTem = ref([]); @@ -700,8 +699,7 @@ factoryListTem.value = res.data; res.data.forEach(item => { factoryList.value[0].push(item.deptName); }); factoryId.value = userStore.currentDeptId; }) } else { // 如果res.data不是数组,设置为空数组 factoryList.value = []; @@ -804,7 +802,6 @@ const loginForm = { username: userStore.name, password: uni.getStorageSync("remembered_password"), factoryId: factoryId, }; modal.loading("刷新中,请耐心等待..."); userStore src/pages/login.vue
@@ -12,17 +12,6 @@ <view class="input-item flex align-center"> <up-input prefixIcon="lock" placeholder="请输入密码" border="bottom" maxlength="20" v-model="loginForm.password" clearable type="password"></up-input> </view> <view class="input-item flex align-center select-container"> <up-icon name="tags" size="18"></up-icon> <up-picker-data v-model="loginForm.factoryId" title="请选择公司" :options="factoryList" valueKey="id" style="width: 100%;" labelKey="name"> </up-picker-data> </view> <view> <button @click="handleLogin" class="login-btn cu-btn block bg-blue lg round">登录</button> </view> @@ -63,7 +52,6 @@ const loginForm = ref({ userName: "", password: "", factoryId: "", currentFatoryName: "", }); const factoryList = ref([]) // 公司列表 src/store/modules/user.ts
@@ -7,7 +7,6 @@ export interface LoginForm { userName: string; password: string; factoryId: string; } const useUserStore = defineStore("user", { @@ -29,9 +28,8 @@ loginCheckFactory(userInfo: any) { const userName = userInfo.userName const password = userInfo.password const factoryId = userInfo.factoryId return new Promise((resolve, reject) => { loginCheckFactory(userName, password, factoryId).then((res: any) => { loginCheckFactory(userName, password).then((res: any) => { setToken(res.token) this.token = res.token resolve(null)