def nextday(self): url = self.address + '/commercialloanv/farm/test/resetForTest' data = { 'deviceId': self.deviceId, 'appId': self.appId, } print_log.printlog(print_log, "GET", url, data)
def chongzhijieti(self): url = self.address + '/commercialloanv/farm/test/updateStageStartTime' data = { 'deviceId': self.deviceId, 'appId': self.appId, } print_log.printlog(print_log, "GET", url, data)
def pick(self,seedID): url = self.address + '/commercialloanv/farm/pickFruit' data = { "slotId":self.slotId, "activityId":self.activityId, "fruitIds":[seedID] } print_log.printlog(print_log,'POST', url, data,self.sessions,headers=self.headers_all,cookies=self.cookies)
def fengche(self): url = self.address + '/commercialloanv/farm/test/resetFacilityFinishTime' data = { 'deviceId': self.deviceId, 'appId': self.appId, 'facilityType': 2, } print_log.printlog(print_log, "GET", url, data)
def finish(self,missionId): url = self.address + '/commercialloanv/farm/finishMission' data = { "activityId": self.activityId, 'missionId': missionId, # 任务Id 'slotId': self.slotId, } print_log.printlog(print_log, 'POST', url, data, self.sessions, headers=self.headers_all, cookies=self.cookies)
def game(self,i): url = self.address + '/commercialloanv/farm/reportActivity' data = { "activityId": self.activityId, 'type': i, # 活动类型 1、激励互动 2、侧边栏小游戏 'slotId': self.slotId, } print_log.printlog(print_log, 'POST', url, data, self.sessions, headers=self.headers_all, cookies=self.cookies)
def unlockLand(self,landId): url = self.address + '/commercialloanv/farm/unlockLand' data = { "activityId": self.activityId, "slotId": self.slotId, "landId": landId, } print_log.printlog(print_log, "GET", url, data, self.sessions)
def water(self): url = self.address + '/commercialloanv/farm/prop/water' data = { "clickAmount": 1, "activityId": self.activityId, "slotId": self.slotId, } print_log.printlog(print_log, 'POST', url, data, self.sessions, headers=self.headers_all, cookies=self.cookies)
def packnum(self): url = self.address + '/commercialloanv/farm/finance/redPacketDetail' data = { "activityId": self.activityId, 'slotId': self.slotId, 'start': 0, # 开始 'size': 1, # 每页个数 } print_log.printlog(print_log, "GET", url, data, self.sessions)
def water_Update(self): # 灌溉升级 url = self.address + "/commercialloanv/farm/prop/waterUpgrade" data = { "slotId": self.slotId, "activityId": self.activityId } print_log.printlog(print_log, 'POST', url, data, self.sessions, headers=self.headers_all, cookies=self.cookies)
def baoxiang(self): url = self.address + '/commercialloanv/farm/randomEvent' data = { 'type': 1, # 1-宝箱 2 - 打地鼠 3-神秘访客 'detailType': 0, # 其他的默认传0 神秘访客时传 1、A金币 2、B金币 3、C金币 'landId': 1, # 表示几号土地 'resultType': 1, # 触发随机事件的方式 0表示到事件消失 1表示触发了 } print_log.printlog(print_log, 'POST', url, data, self.sessions, headers=self.headers_all, cookies=self.cookies)
def farm_update(self,facilityType): # 农场升级 url = self.address + "/commercialloanv/farm/farmUpgrade" data = { "slotId": self.slotId, "activityId": self.activityId, "facilityType": facilityType } print_log.printlog(print_log, 'POST', url, data, self.sessions, headers=self.headers_all, cookies=self.cookies)
def fruit_Update(self): # 果实升级 url = self.address + "/commercialloanv/farm/upgradeFruit" data = { "slotId": self.slotId, "activityId": self.activityId, "fruitType": 2 #facilityType = 2 风车 } print_log.printlog(print_log, 'POST', url, data, self.sessions, headers=self.headers_all, cookies=self.cookies)
def receiveReward(self): url = self.address + '/commercialloanv/farm/finance/receiveReward' data = { 'slotId': self.slotId, "activityId": self.activityId, "type": 2, # 1.离线收益 2.设施奖励 "subType": 2 # 若为设施类型 2.风车 5.仓库 6.推车 离线收益0 } print_log.printlog(print_log, "GET", url, data, self.sessions)
def update_UserCash(self): # 添加用户金币余额 url = self.address + "/commercialloanv/farm/test/updateBalance" data = { "appId": self.appId, "deviceId": self.deviceId, "redPacket": 0, "cash": 100000000 } print_log.printlog(print_log,"GET", url, data)
def fetchGift(self,days): if days < 4: url = self.address + '/commercialloanv/farm/fetchGift' data = { "skinVersion": 2, "slotId": self.slotId, "isNewUser": True } print_log.printlog(self, 'POST', url, data, self.sessions, headers=self.headers_all, cookies=self.cookies) print("新手礼包领取完毕") else: print('超过三天没有新手礼包')
def user(self): url = self.address + '/commercialloanv/farm/initialize' data = { "slotId": self.slotId, "activityId": self.activityId } a = print_log.printlog(print_log,'GET',url,data,self.sessions) rsp = json.loads(a.text, encoding='utf-8') return rsp
def updateTime(self,fruitid): url = self.address + '/commercialloanv/farm/test/updateFruitRipeTime' data = { "fruitId": fruitid, } print_log.printlog(print_log, "GET", url, data, self.sessions)
def chongzhibaoxiang(self): url = self.address + '/commercialloanv/deletefKey' data = { 'str': str(self.appId) + '-' + str(self.cookies['userId']), } print_log.printlog(print_log, "GET", url, data)