no message

This commit is contained in:
DESKTOP-369JRHT\12997 2024-07-11 14:48:35 +08:00
parent 32da0650d8
commit fd47dfec2b
10 changed files with 37 additions and 7 deletions

View File

@ -56,8 +56,8 @@ Vue.prototype.download = download
Vue.prototype.handleTree = handleTree
Vue.prototype.imgurl = 'http://192.168.0.138:8008'
// Vue.prototype.pcUrl = 'http://192.168.0.178:83/'
Vue.prototype.pcUrl = 'https://cashier.youkerr.com/'
Vue.prototype.ztUrl = 'http://localhost:82/'
Vue.prototype.pcUrl = 'http://localhost:83/#/' // 收银台
Vue.prototype.ztUrl = 'http://localhost:82/' // 中台
const Collapse= false
Vue.prototype.isCollapse = Collapse

View File

@ -55,6 +55,12 @@ const user = {
return new Promise((resolve, reject) => {
login(username, password, captchaCode, uuid).then(res => {
console.log("user_58",res.data)
// dutyRoleCode
Cookies.remove('DUTY_ROLE_CODE');
Cookies.set("DUTY_ROLE_CODE", res.data.dutyRoleCode);
if (res.data.ownerId == "3") {
setToken(res.data.token)
commit('SET_TOKEN', res.data.token)

View File

@ -35,7 +35,7 @@
type="primary"
icon="el-icon-plus"
@click="handleAdd1"
v-hasPermi="['duty:index:add']"
>新增
</el-button>
</el-col>
@ -76,12 +76,14 @@
type="text"
icon="el-icon-edit"
@click="handleUpdate1(scope.row)"
v-hasPermi="['duty:index:update']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete1(scope.row)"
v-hasPermi="['duty:index:del']"
>删除</el-button>
</template>
</el-table-column>

View File

@ -279,12 +279,20 @@ export default {
Cookies.remove('rememberMe');
}
app.$store.dispatch("Login", this.loginForm).then(() => {
if (Cookies.get("IS_ZT_LOGIN")) {
location.replace(this.ztUrl+"resource_oilbank");
// Cookies.set("DUTY_ROLE_CODE", res.data.dutyRoleCode);
if (Cookies.get("DUTY_ROLE_CODE") && Cookies.get("DUTY_ROLE_CODE") == 2) {
console.log("123")
location.replace(this.pcUrl+"homeindex");
}else {
app.$router.push({ path: this.redirect || "/" }).catch(()=>{});
if (Cookies.get("IS_ZT_LOGIN")) {
location.replace(this.ztUrl+"resource_oilbank");
}else {
app.$router.push({ path: this.redirect || "/" }).catch(()=>{});
}
}
}).catch(() => {
app.loading = false;
// if (app.captchaOnOff) {

View File

@ -52,6 +52,7 @@
type="primary"
icon="el-icon-plus"
@click="handleAdd"
v-hasPermi="['staff:list:save']"
>新增员工</el-button>
</el-col>
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
@ -109,6 +110,7 @@
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['staff:list:update']"
>修改</el-button>
<el-button
size="mini"
@ -132,6 +134,7 @@
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['staff:list:del']"
>删除</el-button>
</template>
</el-table-column>

View File

@ -44,7 +44,7 @@
<!-- </el-col>-->
</el-row>
<el-button type="primary" @click="submitStore">保存信息</el-button>
<el-button type="primary" @click="submitStore" v-hasPermi="['staff:storeInfo:index:save']">保存信息</el-button>
</el-card>
</el-col>
<el-col :span="6">

View File

@ -76,6 +76,7 @@
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['staff:tag:list:del']"
>删除</el-button>
</template>
</el-table-column>

View File

@ -132,6 +132,7 @@
type="primary"
icon="el-icon-plus"
@click="handleAdd"
v-hasPermi="['staffCommission:staffCommission\n']"
>新增提成方案</el-button>
<el-table ref="tables" v-loading="loading" :data="list"
@selection-change="handleSelectionChange" :default-sort="defaultSort"

View File

@ -150,6 +150,9 @@ public class BackendLoginController extends BaseController {
if (!myPassword.equals(inputPassword) || !tAccount.getAccountStatus().toString().equals("1")) {
return getFailureResult(201, "账号或密码有误");
}
Subject subject = SecurityUtils.getSubject();
UsernamePasswordToken info = new UsernamePasswordToken(accountInfo.getAccountName(), tAccount.getPassword());
subject.login(info);
@ -214,6 +217,10 @@ public class BackendLoginController extends BaseController {
if (!myPassword.equals(inputPassword) || !tAccount.getAccountStatus().toString().equals("1")) {
return getFailureResult(201, "账号或密码有误");
}
TDuty roleById = dutyService.getRoleById(Long.parseLong(accountInfo.getRoleIds()));
Subject subject = SecurityUtils.getSubject();
UsernamePasswordToken info = new UsernamePasswordToken(accountInfo.getAccountName(), tAccount.getPassword());
subject.login(info);
@ -226,6 +233,7 @@ public class BackendLoginController extends BaseController {
if (ObjectUtil.isEmpty(one.getOwnerId())) {
one.setOwnerId(-1); //设置为普通员工并进行跳转
}
response.setDutyRoleCode(roleById.getRoleCode());
response.setOwnerId(one.getOwnerId().toString());
response.setTokenCreatedTime(new Date());
return getSuccessResult(response);

View File

@ -21,4 +21,5 @@ public class LoginResponse implements Serializable {
private Integer accountId;
private String phone;
private String ownerId;
private String dutyRoleCode;
}