# -*- coding: utf-8 -*-
"""
@author:zhaiht
@file:  envcfg.py
@time:  2020/8/6 17:34
@desc:
"""
from numpy import long
import os, sys
from common.iniUtil import read_config


# 生产环境:
path = "/Users/zhaihuitao/PycharmProjects/TKIO/interfaceTest/config/setting/config.ini"
rc = read_config(path)
url = rc.get("env", "click_url")
print(url)


click_url = 'http://uri6.com/tkio/fMnmYba'
prod_event_url = 'http://log.trackingio.com'
# prod_event_url = 'http://10.3.20.42:8080'
test_event_url = 'http://10.3.20.42:8080'
prod_appkey = "895c5256a7f47bd2cca88a29da9e978a"
# prod_appkey = "57ed2dd31596bb4682471e82c0c73c1a"
event_interface = dict(install='/receive/tkio/install', loggedin='/receive/tkio/loggedin',
                       pageduration='/receive/tkio/pageduration', payment='/receive/tkio/payment',
                       order='/receive/tkio/order', register='/receive/tkio/register',
                       startup='/receive/tkio/startup', event='/receive/tkio/event',
                       appduration='/receive/tkio/appduration', adshow='/receive/tkio/adshow', adclick='/receive/tkio/adclick')


prod = {
    "click": ["http://t.uri6.com/tkio/EFbIzya?noredirect=true", "895c5256a7f47bd2cca88a29da9e978a"],
    "events": {
        "url": "http://log.trackingio.com/receive/tkio/",
        # "url": "http://10.3.20.42:8080",
        "interface": "/receive/tkiov2/install",
        "appkey": "b58f29d64718c6723895cb8a2389258c",
        "adclick": "adclick"

    },

}

headers = {'Content-Type': 'application/json'}

'''prod_params = {
    'androidid': "43214532142142",
    'imei': randomUtil.r.randimei(),
    "idfa": 'DBC13622-E34B-440C-B7A7-FB6641D0D9AB',
    'ip': randomUtil.r.randip(),
    "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko)Version/5.1 "
          "Mobile/9A334 Safari/7534.48.3", 'creativeId': '21321321312123', 'requestId': '312321321312',
    "adId": long('21231'),
    "ry_adgroup_name": "头条广告组2",
    "ry_adplan_name": "头条广告计划2",
    "ry_adcreative_name": "头条广告名称2",
    "ry_adgroup_id": 999,
    "ry_adplan_id": 999,
    "ry_adcreative_id": 999,
    "appduration": 10,
    "pageduration": 1000,
    "istablet": "istablet",
    "lib": "IOS",
    "when1": "'2020-06-06 16:44:31'",
    "model": "测试1",
    "ryosversion": "10.0.0",
    "network_type": "5G",
    "carrier": "中国联通",
    "lv": "1.5.0",
    "cmpaignid": 3333,
    "current_time_13": int(round(time.time() * 1000)),
    "when": time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())),
    "ds": time.strftime('%Y-%m-%d', time.localtime(time.time())),
    "manufacturer": "VIVO",
    "ryos": "android",
    "rydevicetype": "vivox9",
    "network": "wifi",
    "resolution": "1344*750",
    "op": "中国移动",
    # 支付类型   支付宝(alipay),银联(unionpay),微信支付(weixinpay),易宝支付(yeepay)
    "paymenttype": "alipay",
    "currencytype": "CNY",
    "currencyamount": 10,
    "adid": 839296815,
    # 填充广告的变现平台,例如穿山甲(csj)、优量汇(ylh)、百青藤(bqt)、Sigmob(sigmob)、快手(ks)、Mintegral(mintegral)、OneWay(oneway)、Vungle(vungle)等
    "adPlatform": "mintegral"
}'''