Arthur-Wu committed this file on 2024-11-27
This commit is contained in:
parent
0d74d0787b
commit
9af4fe3ef4
@ -18,9 +18,13 @@ def demo1120():
|
||||
Broadcast completed: result=0
|
||||
'''
|
||||
# res2 = os.popen("adb shell am broadcast -a com.ieemoo.autoAction -e barcode 6971648922990").read()
|
||||
res2 = os.popen("adb shell am broadcast -a com.ieemoo.autoAction -e barcode 293849600000").read()
|
||||
# print(res)
|
||||
print(res2)
|
||||
goods_inputcode = '292413500442005544'
|
||||
goods_weight = '800'
|
||||
add_goods = f"adb shell am broadcast -a com.ieemoo.autoAction -e barcode {goods_inputcode}"
|
||||
res2 = os.popen(add_goods).read()
|
||||
add_goods_weight = f'adb shell am broadcast -a com.ieemoo.autoAction -e weight {goods_weight}'
|
||||
res3 = os.popen(add_goods_weight).read()
|
||||
print(f"res3: {res3}")
|
||||
|
||||
|
||||
demo1120()
|
@ -293,10 +293,31 @@ class YMClientApi(object):
|
||||
logging.info(f"-----------接口返回数据:{response.json()}\n\n")
|
||||
return response.json()
|
||||
|
||||
def traverse_the_barcode_of_the_prod(self, FP):
|
||||
'''
|
||||
根据商品Barcode遍历商品信息
|
||||
:return:
|
||||
'''
|
||||
logging.info("========== [根据商品Barcode遍历商品信息] ==========")
|
||||
'''
|
||||
1- 遍历读取Barcode
|
||||
2、根据Barcode遍历请求接口
|
||||
3、根据Barcode查询情况,回写商品信息
|
||||
'''
|
||||
def get_barcode_data():
|
||||
import xlrd
|
||||
workbook = xlrd.open_workbook(FP)
|
||||
sheet = workbook.sheet_by_index(0)
|
||||
first_column = []
|
||||
for row in range(sheet.nrows):
|
||||
first_column.append(sheet.cell_value(row, 0))
|
||||
return first_column
|
||||
for barcode in get_barcode_data():
|
||||
logging.info(f"-----------当前Barcode为:{barcode}")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
ymc = YMClientApi()
|
||||
ymc = YMClientApi(ShoppingCartMac='')
|
||||
''' 01- '''
|
||||
ymc.session_start() # step1:session开始
|
||||
Payload01 = {"action": 0, "isAnon": True}
|
||||
|
37
YiMao/data/BusinessPublicParam.yaml
Normal file
37
YiMao/data/BusinessPublicParam.yaml
Normal file
@ -0,0 +1,37 @@
|
||||
# This file is used to store the public parameters of the business system.
|
||||
|
||||
ADPublishingJson:
|
||||
LoginPageAD: # 登录页广告
|
||||
adsAreaId": 1
|
||||
mediaType": 1
|
||||
mediaUrl": ads/content/534ae9d7-3f65-48da-bc2e-3d5e66fe56d8.jpg
|
||||
showOrder": 1
|
||||
showTime": 5
|
||||
PopupADAfterLogin: # 登录后弹窗广告
|
||||
adsAreaId": 2
|
||||
mediaType": 1
|
||||
mediaUrl": ads/content/534ae9d7-3f65-48da-bc2e-3d5e66fe56d8.jpg
|
||||
ShoppingCartHomepageAD: # 购物车主页广告
|
||||
adsAreaId": 3
|
||||
mediaType": 1
|
||||
mediaUrl": ads/content/534ae9d7-3f65-48da-bc2e-3d5e66fe56d8.jpg
|
||||
showOrder": 1
|
||||
showTime": 5
|
||||
StandbyAD: # 待机页广告
|
||||
adsAreaId": 4
|
||||
mediaType": 1
|
||||
mediaUrl": ads/content/534ae9d7-3f65-48da-bc2e-3d5e66fe56d8.jpg
|
||||
showOrder": 1
|
||||
showTime": 5
|
||||
ScanCodeAD: # 扫码广告
|
||||
adsAreaId": 5
|
||||
mediaType": 1
|
||||
mediaUrl": ads/content/534ae9d7-3f65-48da-bc2e-3d5e66fe56d8.jpg
|
||||
PostPaymentAD: # 支付后广告
|
||||
adsAreaId": 6
|
||||
mediaType": 1
|
||||
mediaUrl": ads/content/534ae9d7-3f65-48da-bc2e-3d5e66fe56d8.jpg
|
||||
InvoiceAD: # 小票广告
|
||||
adsAreaId": 7
|
||||
mediaType": 1
|
||||
mediaUrl": ads/content/534ae9d7-3f65-48da-bc2e-3d5e66fe56d8.jpg
|
@ -1,85 +0,0 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Date:: 2024/11/15-14:46
|
||||
# @Description::
|
||||
''' 武商场景测试数据集
|
||||
adsAreaId-1: 登录页广告
|
||||
adsAreaId-2: 登录后弹窗广告
|
||||
adsAreaId-3: 购物车主页广告
|
||||
adsAreaId-4: 待机广告
|
||||
adsAreaId-5: 扫码广告
|
||||
adsAreaId-6: 支付后广告
|
||||
adsAreaId-7: 小票广告
|
||||
'''
|
||||
''' 1-购物车Mac地址 '''
|
||||
ShoppingCartMac = "b8:2d:28:04:c7:5c"
|
||||
|
||||
''' -武商会员账号 '''
|
||||
VIPPhoneNumber = "17786408673"
|
||||
|
||||
''' -商超、门店信息
|
||||
梦时代:storeId: 69, marketId: 50
|
||||
百圣:storeId: 29, marketId: 50
|
||||
'''
|
||||
MarketAndStoreDetails = {"putMarketId": 50, "putStoreId": ["69"]}
|
||||
''' -购物袋 '''
|
||||
GoodsBagInputcode_mid = '6971648922990'
|
||||
GoodsBagInputcode_max = '6971648922983'
|
||||
''' -普通商品-2件 '''
|
||||
NormalGoodsInputcode01 = "6925791908202" # 荆味酥糖
|
||||
NormalGoodsInputcode02 = "6925303796426" # 统一番茄牛肉面
|
||||
NormalGoodsInputcode03 = "6924743915848" # 乐事薯片
|
||||
|
||||
''' -优惠商品 '''
|
||||
VipGoodsInputcode = "6922024730036" # 大白兔奶糖
|
||||
VipGoodsInputcode02 = "4897114790479" # 维极熊白啤酒1L
|
||||
VipGoodsInputcode03 = "4820193033335" # 巴瓦克纯麦啤酒
|
||||
|
||||
''' -折扣商品 '''
|
||||
SaleGoodsInputCode = "9588856298051" # 濠品轩燕麦酥
|
||||
''' -促销商品白名单 '''
|
||||
PromotionalWhitelistGoods = {"GoodsInputcode": "9588856298051", "GoodsName": "濠品轩燕麦酥"}
|
||||
''' -重量放通白名单 '''
|
||||
WeightToWhitelistGoods = {"GoodsInputcode": "6922024730036", "GoodsName": "大白兔奶糖"}
|
||||
''' -散称计重商品 '''
|
||||
BulkGoods = {"GoodsInputcode": "2934431009517", "GoodsName": "阿克苏苹果"}
|
||||
''' -计件商品 '''
|
||||
PieceRateGoods = {"GoodsInputcode": "2910551005806", "GoodsName": "优选大白菜秧"}
|
||||
|
||||
|
||||
''' 0-广告数据 '''
|
||||
WuShangADDetail = [
|
||||
{
|
||||
"adsAreaId": 1, "mediaType": 1,
|
||||
"mediaUrl": "ads/content/534ae9d7-3f65-48da-bc2e-3d5e66fe56d8.jpg",
|
||||
"showOrder": 1, "showTime": 5,
|
||||
},
|
||||
{
|
||||
"adsAreaId": 2, "mediaType": 1,
|
||||
"mediaUrl": "ads/content/93e34d0e-9f4c-499b-ad8b-5741e55528b5.jpg",
|
||||
},
|
||||
{
|
||||
"adsAreaId": 3, "mediaType": 1,
|
||||
"mediaUrl": "ads/content/581ec30a-4d90-43f3-b0e9-b5c8fe0006b4.jpg",
|
||||
"showOrder": 1, "showTime": 5,
|
||||
},
|
||||
{
|
||||
"adsAreaId": 4, "mediaType": 1,
|
||||
"mediaUrl": "ads/content/8c8f6de0-6eb7-4b66-98cd-2c85eb057ed5.png",
|
||||
"showOrder": 1, "showTime": 5,
|
||||
},
|
||||
{
|
||||
"adsAreaId": 5, "mediaType": 1,
|
||||
"mediaUrl": "ads/content/9d5555e3-fec1-4e1a-94e7-b517f4e88aba.jpg",
|
||||
},
|
||||
{
|
||||
"adsAreaId": 6, "mediaType": 1,
|
||||
"mediaUrl": "ads/content/e2e2e892-1a81-4b0f-9af2-cb46f04a5dc4.jpg",
|
||||
},
|
||||
{
|
||||
"adsAreaId": 7, "mediaType": 1,
|
||||
"mediaUrl": "ads/content/6d9c14ca-3fd1-4fe7-b04a-84cf18937e60.jpg",
|
||||
}
|
||||
]
|
||||
|
@ -1,5 +0,0 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Date:: 2024/11/18-11:49
|
||||
# @Description::
|
Binary file not shown.
@ -12,4 +12,4 @@ ReportsURL: http://192.168.1.165
|
||||
|
||||
# 4-联测测试的商超列表: WuShang\ZhongBai\YongHui\JiajiaYue
|
||||
MarketsArray:
|
||||
- ZhongBai
|
||||
- JiajiaYue
|
Loading…
x
Reference in New Issue
Block a user