修复:已知问题
This commit is contained in:
@@ -6,6 +6,7 @@ import {HjmCar} from "@/api/hjm/hjmCar/model";
|
||||
import Taro from '@tarojs/taro'
|
||||
import './location.scss'
|
||||
import BestSellers from "./BestSellers";
|
||||
import {getUserInfo} from "@/api/layout";
|
||||
|
||||
/**
|
||||
* 文章终极列表
|
||||
@@ -19,31 +20,30 @@ const List = () => {
|
||||
setKeywords(keywords)
|
||||
}
|
||||
|
||||
const reload = () => {
|
||||
const reload = async () => {
|
||||
// 搜索条件
|
||||
const where = {status: 1, deleted: 0, keywords}
|
||||
|
||||
// 读取用户信息
|
||||
const user = await getUserInfo();
|
||||
|
||||
// 判断身份
|
||||
const roleCode = Taro.getStorageSync('RoleCode');
|
||||
if(roleCode == 'kuaidiyuan'){
|
||||
// @ts-ignore
|
||||
where.driverId = Taro.getStorageSync('UserId')
|
||||
where.driverId = user.userId;
|
||||
}
|
||||
if(roleCode == 'zhandian'){
|
||||
// @ts-ignore
|
||||
where.organizationId = Taro.getStorageSync('OrganizationId');
|
||||
where.organizationId = user.organizationId;
|
||||
}
|
||||
if(roleCode == 'kuaidi'){
|
||||
if(Taro.getStorageSync('OrganizationId') == Taro.getStorageSync('OrganizationParentId')){
|
||||
// @ts-ignore
|
||||
where.organizationParentId = Taro.getStorageSync('OrganizationParentId');
|
||||
}else {
|
||||
// @ts-ignore
|
||||
where.organizationId = Taro.getStorageSync('OrganizationId');
|
||||
}
|
||||
// @ts-ignore
|
||||
where.organizationParentId = user.organizationId;
|
||||
}
|
||||
if(roleCode == 'Installer'){
|
||||
// @ts-ignore
|
||||
where.installerId = Taro.getStorageSync('UserId')
|
||||
where.installerId = user.userId;
|
||||
}
|
||||
if(roleCode == 'user'){
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user