我正在尝试使用邮递员将对象数组作为表单数据发送。但这不起作用。我在 StackOverflow 中点击此链接...但它对 mt 有效。
当我像这样发送我的类别时,它的发送方式如下:- 类别返回 null 属性。

应该是这样的。我在传递数据应用程序/JSON 时得到了这个屏幕截图。

但现在我需要发送带有我的请求的图像,我需要将我的请求作为表单/数据发送。但是我的类别对象数组没有按照我想要的方式传递,也没有按照我的系统想要的方式传递。我真的需要你的帮助。谢谢。
我真的需要你的帮助。我与 @NestJs/mongoose 的 MongoDB 事务不起作用...当我的条带支付失败时回滚不起作用...不过,我的订单集合保存了数据...我该如何解决这个问题..?
async create(orderData: CreateOrderServiceDto): Promise<any> {
const session = await this.connection.startSession();
session.startTransaction();
try {
const createOrder = new this.orderModel(orderData);
const order = await createOrder.save();
await this.stripeService.charge(
orderData.amount,
orderData.paymentMethodId,
orderData.stripeCustomerId,
);
await session.commitTransaction();
return order;
} catch (error) {
await session.abortTransaction();
throw error;
} finally {
await session.endSession();
}
}
Run Code Online (Sandbox Code Playgroud) 我需要添加一个位置图标来反应 Material-UISelect选项。但没有选项...我在 select 中阅读了 API 文档,但找不到相关选项。所以我真的需要你的帮助。非常感谢。
我找到了这样的代码。但无法正常工作。
<div id='location-box'>
<Select>
<MenuItem value="">
<ListItemIcon>
<LocationOnIcon />
</ListItemIcon>
<ListItemText primary="Inbox" />
</MenuItem>
<MenuItem value={10}>Ten</MenuItem>
<MenuItem value={20}>Twenty</MenuItem>
<MenuItem value={30}>Thirty</MenuItem>
</Select>
</div>
Run Code Online (Sandbox Code Playgroud) 我需要将下拉悬停更改为绿色。我尝试了内联 CSS 和makeStyle(),但这些都不适合我。我不知道改变这个悬停颜色。如果有人能帮助我解决这个问题,我真的很感激。
我需要将此悬停颜色更改为绿色。这是我的代码:-
<Select
className={dropDowStyle.select}
style={{
borderRadius: '8px', marginLeft: '-150px',
width: '163px', height: '45px', fontSize: '15px',
backgroundColor: "transparent",borderColor:primaryColor + "88"
}}
sx={{width: 163}}
// defaultValue=""
input={<OutlinedInput style={{borderColor: primaryColor + "88",}}/>}
displayEmpty
value={city}
renderValue={(value) => {
return (
<Box sx={{display: "flex", gap: 2.5}}>
<SvgIcon style={{fontSize: '20px'}}>
<LocationOnIcon/>
</SvgIcon>
{renderLocation && value}
</Box>
);
}}
onChange={cityValueHandler}
>
{shopLocation.map((option) => (
<MenuItem key={option.gg} value={option.gg}>
{option.gg}
</MenuItem>
))}
</Select>
Run Code Online (Sandbox Code Playgroud) 我是 Nest js 的新手,我正在尝试使用 JWT 令牌对 Nest js 进行身份验证。我通过这篇文章来实现我的身份验证代码。
当我运行代码时,我收到这样的错误。
**
[Nest] 16236 - 01/29/2022, 7:16:06 PM 错误 [ExceptionHandler] Nest 无法解析 AuthenticationService(?、JwtService、ConfigService)的依赖项。请确保索引 [0] 处的参数 UsersService 在 AuthenticationModule 上下文中可用。潜在的解决方案:
- 如果 UsersService 是提供者,它是当前 AuthenticationModule 的一部分吗?
- 如果 UsersService 是从单独的 @Module 导出的,那么该模块是否在 AuthenticationModule 中导入?@Module({ import: [ /* 包含 UsersService 的模块 */ ] })
**
而且我不知道我的代码有什么问题。
这是我的用户模块:
@Module({
imports: [TypeOrmModule.forFeature([User])],
controllers: [UsersController],
providers: [UsersService],
})
export class UsersModule {}
Run Code Online (Sandbox Code Playgroud)
这是我的身份验证模块:
@Module({
imports: [
UsersModule,
PassportModule,
ConfigModule,
JwtModule.registerAsync({
imports: [ConfigModule],
inject: [ConfigService],
useFactory: async …Run Code Online (Sandbox Code Playgroud) 我需要读取控制器中的 CSV 文件,以将 CSV 文件数据添加到我的数据库中。但我不知道该怎么做。我多次寻找答案,但找不到与我的问题相关的答案。我真的需要你的帮助。谢谢。
我的控制器方法:-
@Post()
@UseInterceptors(FileInterceptor('filename', { dest: './uploads' }))
async upload(@UploadedFile() files: Express.Multer.File) {
console.log(files);
}
Run Code Online (Sandbox Code Playgroud)
我的控制台日志输出:-
我需要删除 Material-UI 对话框中的背景阴影。但我找不到API的方法。任何人都可以帮助我。
我需要消除这个阴影...
<div id={"Location_Massage"} style={{ height: "10px !important" }}>
<Dialog
className={classes.location_verify_dialog}
fullScreen={fullScreen}
open={open}
style={{
marginTop: -470,
marginLeft: 460
}}
onClose={handleClose}
aria-labelledby="responsive-dialog-title"
>
<DialogContent>
<DialogContentText
style={{
borderRadius: 12,
height: "10px !important",
width: 170
}}
>
<div style={{ fontSize: 15, fontWeight: 700 }}>Me Labs</div>
</DialogContentText>
</DialogContent>
<DialogActions>
<Button
style={{ borderRadius: 15, left: -6, top: -15 }}
onClick={handleClose}
color="primary"
variant={"outlined"}
>
Cancel
</Button>
<Button
style={{ borderRadius: 15, left: -4, top: -15 }}
onClick={handleClose}
color="primary"
variant={"contained"}
>
Submit
</Button>
</DialogActions>
</Dialog>
</div>
Run Code Online (Sandbox Code Playgroud)