⑦保存时数据格式
6️⃣ 合并两个对象组成的数组,前两种方法都不对,最后一种OK
for (const naInfo of nameInfo) {
listings.map( (v: any) => Object.assign(v, naInfo))
}
nameInfo.map((value: any) => listings.map((v: any) => Object.assign(v, value)))
for ( let i = 0; i < nameInfo.length; i++) {
Object.assign(listings[i], nameInfo[i])
}
5️⃣ TS类型定义错误
控制台打印出来是数组,但是TS说不是
查看该类型定义,确实是对象,list属性才是数组
修改定义的地方,对象改为数组,成功
4️⃣ mainV2的接口请求方法不能写在Gateway.d.ts配置里。并且组件使用的方法名字必须和API里面定义的相同。
3️⃣ saveNewProdOrder保存计划的数量时候,传数组
1️⃣ 二进制与或运算
var arr = [1,2,4,8]
var has = []
var from_type = 1
for(var i = 0;i < 4;i++){
if ((arr[i]&from_type)>0){ has.push(arr[i])}
}
curl 'https://dev-main.bindo.io/gateway/v2/stores/4934/other_payment_instruments/update_all' -H
'origin: http://localhost:3000' -H
'x-user-device-type: pos' -H
'accept-language: zh-CN,zh;q=0.9,en;q=0.8' -H
'authorization: OAuth k9uxka0b50axlukoned39xk9sirm097' -H
'x-user-access-token: k9uxka0b50axlukoned39xk9sirm097' -H
'accept-encoding: gzip, deflate, br' -H
'x-request-id: 64d9c8b1-503c-4189-8124-699b6e6984ef' -H
'x-application: dashboard.bindo.com' -H
'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36' -H
'content-type: application/json' -H
'accept: application/json' -H
'referer: http://localhost:3000/v2/4934/settings/payments/payment-type' -H
'authority: dev-main.bindo.io'
--data-binary '{"payment_instruments":
[{"id":1838,
"name":"Cash",
"tipping_enabled":true,
"fixed_amount_enabled":false,
"fixed_amount":0,
"reference_number_id":5,
"payment_type_id":4,
"room_number":"",
"shortcut_enabled":false,
"to_pms_enabled":false}]}' --compressed
新增一栏多选
容错处理,后台返回的mull进行处理
2️⃣ qty_fulfilled_in_display_unit
payload
response
网友评论